Sorting Events

Sorting process is started after user click on Column's header, or one of the following properties is changed:

- Sorted
- SortKind
- SortType

In single column sort mode, only one column can have Sorted property set to True.

There is a handy property SortedColumn which can be used to determine sorted column. If there are no sorted column, this property return nil.


NextGrid61.Columns[5].Sorted := True; NextGrid61.Columns[3].SortKind := skDescending; // add NxTypes6 in uses PersonColumn.SortType := stCaseInsensitive; if CustomersGrid.Column.SortedColumn <> nil then CustomersGrid.Columns.SortedColumn.SortKind := skAscending;
If SortType is set to stCustom. OnCellCompare event will occur during sorting routine. This event is handy for Custom Sorting.

There are several events used in sorting process. They are occur in next order:

See also