TcxGridDBTableView.DataController Property
Refers to the data controller providing data for the View.
Declaration
property DataController: TcxGridDBDataController read; write;
Property Value
Type |
---|
TcxGridDBDataController |
Remarks
Use the DataController property to access a TcxGridDBDataController instance managing the View’s connection to a TDataSet. You connect a View to a dataset via the DataController.DataSource property.
To create a master-detail relationship, create a data controller for every dataset and specify the master and detail key field names via the DataController.MasterKeyFieldNames and DataController.DetailKeyFieldNames properties of the detail data controller.
You may also need to set key field names via the DataController.KeyFieldNames property to get the grid to function properly. You should set the DataController.KeyFieldNames property in the following cases:
if you want to perform in-sync operations on the TDataSet in a detail data controller such as editing and adding records;
if you need to delete several selected records from the corresponding dataset;
if you want to speed up navigation when data in your grid control is synchronized with TDataSet.
The DataController.DataModeController manages the synchronization between the data displayed and the corresponding dataset. It also controls the way data is obtained by the detail data controller when it is linked to a parameterized query.