Skip to main content

TcxCustomDataController.IsGridMode Method

Indicates whether your data controller is working in grid mode.

Declaration

function IsGridMode: Boolean;

Returns

Type
Boolean

Remarks

The IsGridMode function returns a value indicating if the grid mode is in effect. For TcxCustomDataController objects, IsGridMode always returns False. For TcxDBDataController objects, the IsGridMode function returns True if the following conditions are met:

In other cases, IsGridMode returns False, thus indicating that the grid mode is currently disabled. In this instance, the data controller loads all records from the dataset into the memory buffer.

To enable grid mode for a data-aware data controller, set its DataModeController.GridMode property to True. However, if the dataset is unidirectional (a TCustomSQLDataSet descendant), the grid mode is not activated even if the DataModeController.GridMode property is set to True. See the TDataSet.IsUniDirectional property to know whether the dataset is unidirectional.

Grouping data is not supported in grid mode. If you group data when the DataModeController.GridMode property is set to True, the grid mode is automatically disabled and the IsGridMode function returns False. When you clear grouping, the grid mode is automatically re-enabled (IsGridMode will return True).

See Also