TcxGridChartDataController Class
A data controller which implements the functionality required to work with a data store.
Declaration
TcxGridChartDataController = class(
TcxDataController,
IcxCustomGridDataController
)
Remarks
A data controller implements the functionality required to work with a data store and perform operations on it (managing, addressing and setting options for sorting the data which correspond to the View items (categories and series). The data controller provides information to a View. You can use the View’s DataController property to get direct access to the data displayed by this View. However, it’s recommended that you use the View’s Categories, Series or ViewData properties for these purposes since they provide a more convenient way to manage the data which is associated with the View.
TcxGridChartDataController
implements working in provider and unbound modes and enables you to populate a View from custom data sources. To connect to a dataset, use a data-aware Chart View instead. It retrieves and sets data using the TcxGridDBChartDataController class.
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 the CustomDataSource by calling its methods internally. You must override them to supply a data controller with the data which corresponds to each record/item. In order to enable an end-user to post data to a custom data source, you must override the SetValue method declared by the TcxCustomDataSource class.
In contrast, for unbound mode, you have to populate a data controller record by record. First, you must set the number of records via the RecordCount property. Then each record value must be set manually via the Values property (for instance, by using the for operator).
Refer to the Data Loading Modes, Provider Mode and Unbound Mode sections for more details.