Show/Hide Toolbars

TMS Aurelius Documentation

Navigation: » No topics above this level «

Data Binding - TAureliusDataset

Scroll Prev Top Next More

TMS Aurelius allows you to bind your entity objects to data-aware controls by using a TAureliusDataset component. By using this component you can for example display a list of objects in a TDBGrid, or edit an object property directly through a TDBEdit or a TDBComboBox. TAureliusDataset is declared in unit Aurelius.Bind.Dataset:

 

uses 

  {...}, Aurelius.Bind.Dataset;

 

Basic usage is done by these steps:

 

1. Set the source of data to be associated with the dataset, using SetSourceList method, or a single object, using SetSourceObject

2. Optionally, create a TField for each property/association/sub-property you want to display/edit. If you do not, default fields will be used.

3. Optionally, specifiy a TObjectManager using the Manager property. If you do not, you must manually persist objects to database.

 

TAureliusDaset is a TDataset descendant, thus it's compatible with all data-aware controls provided by VCL, the Firemonkey live bindings framework and any 3rd-party control/tool that works with TDataset descendants. It also provides most of TDataset functionality, like calculated fields, locate, lookup, filtering, master-detail using nested datasets, among others.

 

The topics below cover all TAureliusDataset features.

 

Providing Objects

oProviding an Object List

oProviding a Single Object

oUsing Fetch-On-Demand Cursor

oUsing Criteria for Offline Fetch-On-Demand

Internal Object List

Using Fields

oDefault Fields and Base Class

oSelf Field

oSub-Property Fields

oEntity Fields (Associations)

oDataset Fields (Many-Valued Associations)

oHeterogeneous Lists (Inheritance)

Modifying Data

oNew Objects When Inserting Records

oManager Property

oObjects Lifetime Management

oManual Persistence Using Events

Locating Records

Calculated Fields

Lookup Fields

Filtering

Design-time Support