TcxCustomDBTreeList.DataController Property
Provides access to an object that manages the connection to a data source.
Declaration
property DataController: TcxDBTreeListDataController read; write;
Property Value
Type |
---|
TcxDBTreeListDataController |
Remarks
Use this property to access a TcxDBTreeListDataController object to manage the tree list’s connection to a data source. The DataController.DataSource property specifies the dataset to which the TcxDBTreeList control is connected.
The DataController.KeyField and DataController.ParentField properties are required to build the tree structure.
DataController.KeyField values identify records. The DataController.ParentField property designates the dataset field whose values define the record’s position within the tree structure. DataController.ParentField values specify the DataController.KeyField value of the record (node in the tree structure) owning the record (node).
The TcxDBTreeList component provides the design-time capability to easily connect its data controller to a data source located on a form. To accomplish this, invoke the tree list’s context menu and select the required data source via the “Link to DataSource” item. If the data source is linked to a dataset, the data controller automatically calls its CreateAllItems method to create columns bound to dataset fields.