Skip to main content

Data Modes Overview

  • 2 minutes to read

A data mode is the method the grid control uses to exchange data with the underlying data source, it depends on the type of data source the grid control connects to.

To make any view control independent of a data source there are a data layer components that are aware of how to handle data for the view control. For example, Delphi provides TDataSet data layer classes family to process different types of data source.

The vertical grid control supports two data modes:

The TcxDBVerticalGrid control is responsible for work in this mode. In the Bound Mode this type of vertical grid uses the TDataSet descendants to communicate with the underlying data. The TcxDBVerticalGrid control then communicates with the TDataSet descendant using a sequence of classes - the TcxDBVerticalGridDataController class that manages interaction between the grid and a data layer and the standard TDataSource class that plays a role as conduit between the controller and dataset. Besides functionality mentioned above the TcxDBVerticalGridDataController adds implementation for comprehensive data processing. This class eases the task of configuring or implementing a connection with data at design time or runtime. For details please refer to the Bound Mode topic.

The Provider Mode implies that the vertical grid communicates with a custom data source (for example, a flat file). A custom data source means that it is not possible to develop standard data layer classes beforehand for a given type of data source. For this purpose the TcxVirtualVerticalGrid control was developed. It works with the TcxCustomDataSource class that defines base functionality for communication with a data source. You should implement the TcxCustomDataSource descendant and override at least three methods GetRecordCount, GetValue and SetValue to provide read-write operations for this mode. For details please refer to the Provider Mode topic.

Note

You can enable the navigator in these modes to let end-users easily manage records and modify data cell values in the vertical grid.

See Also