Skip to main content
A newer version of this page is available. .

TcxGridDataController Class

A data controller.

Declaration

TcxGridDataController = class(
    TcxDataController,
    IcxCustomGridDataController,
    IcxGridDataController
)

Remarks

A data controller mediates between the View and the underlying data store. It handles requests between them and provides comprehensive data processing (grouping, sorting, filtering, and summaries calculation).

Use the View’s DataController property to get direct access to the data layer.

TcxGridDataController is responsible for provider and unbound modes.

In provider mode, you need to create your own data source by deriving it from the TcxCustomDataSource class and by assigning its instance to the CustomDataSource property. A data controller will retrieve data from or post data to the CustomDataSource by calling its methods internally. You must override them in the subclass to supply a data controller with information on the custom data structure.

In contrast, for unbound mode, you have to populate a data controller’s cache record by record. First, set the number of records via the RecordCount property. Then each record value should be set manually using the Values property.

In bound mode, use the TcxDBGridDataController class instead.

Refer to the Data Loading Modes, Provider Mode and Unbound Mode sections for more information.

See Also