Skip to content

Sorting cDBCJGrid Data

To enable grid reordering by clicking a column header, set the property [pbHeaderReorders](../VdfClassRef/Windows/cCJGrid-Property-pbHeaderReorders.md) to true.

To enable toggling the column sort order with repeated clicking in the column header, set the property [pbHeaderTogglesDirection](../VdfClassRef/Windows/cCJGrid-Property-pbHeaderTogglesDirection.md) to true.

Sorting Data Aware Grids with Dynamic Data

Data aware grids ([cDbCJGrid](../VdfClassRef/Windows/cDbCJGrid.md)) whose data is loaded dynamically and automatically from the associated Data Dictionary Object Structure (DDO structure) can only be sorted by columns bound to an indexed table column.

To programmatically change the ordering for a dynamically loaded grid, send the procedure [ReorderGridByColumn](../VdfClassRef/Windows/cDbCJGrid-Procedure-ReorderGridByColumn.md).

Sorting Data Aware Grids with Static Data

Data aware grids whose data is loaded statically can sort their row data using any available column and column sort rules.

To specify a statically loaded data aware grid, set the property [pbStaticData](../VdfClassRef/Windows/cDbCJGrid-Property-pbStaticData.md) to True.

For more information about sorting statically loaded data aware grids, see [Sorting cCJGrid Data](Sorting_cCJGrid_Data.md).

See Also