Icon SortDirection Property

property SortDirection: TSortDirection

Usage

Available In: Visual Client Applications

Specifies the sort for the column. If the grid is data-bound (DataSet property is not nil) and the column has been assigned a valid column name in the DataColumn, then assigning sdAscending or sdDescending to this property will cause the dataset to add the column specified in the DataColumn property to the active sort for the dataset. Assigning sdNone to this property will cause the dataset to remove the column specified in the DataColumn property from the active sort for the dataset.

If the grid is un-bound, then assigning sdAscending or sdDescending to this property will cause the grid to add the column to the active sort. Assigning sdNone to this property will cause the grid to remove the column from the active sort.

The default value is sdNone.

If the ColumnHeaders property is True when this property is changed, then the column header will reflect the sort status of the column.

Information The TDataSet Sort method is automatically called by the grid when the grid is data-bound and this property is changed. If the grid is un-bound, then the TGrid SortRows method is automatically called when this property is changed.
Image