Skip to main content

TcxDBDataModeController.GridMode Property

Determines whether the data controller works in grid mode.

Declaration

property GridMode: Boolean read; write; default False;

Property Value

Type Default
Boolean False

Remarks

When in grid mode, the data controller loads a fixed number of dataset records according to the GridModeBufferCount property. In this mode, the data controller’s performance is better, but features such as automatic sorting, filtering and summary calculations are disabled. You have to write appropriate event handlers (OnSortingChanged, Filter.OnBeforeChange, OnAfterSummary) to perform these actions.

To enable data filtering in grid mode, you can use the AutoDataSetFilter property as well as the OnBeforeChange event. Setting the AutoDataSetFilter property to True automatically applies the changed filter criteria to the dataset’s Filter property. See the AutoDataSetFilter and OnBeforeChange descriptions for more details.

Grid mode is automatically switched off when grouping is applied to a grid view. In this case (and also if the GridMode property value is False), the data controller switches to default mode. In this mode, all dataset records are loaded to the data controller and automatic sorting, filtering and summary calculations are available. The SmartRefresh property is also in effect when the data controller is in default mode.

Important

If you enable grid mode for a master/detail relationship, both views must be in grid mode, else data will not be displayed correctly. When in grid mode, detail data controllers cannot be linked to a parameterized query dataset (TQuery, for instance), i.e. in grid mode, the master data controller’s DetailInSQLMode property should be set to False.

The default value of the GridMode property is False.

See Also