Sign in Join
FPDoc Onlineexperiment

TCustomListView.SortDirection property

Member of TCustomListViewprotectedIn unit ComCtrls

Sorting direction (order) for the current SortColumn.

Declaration

pascal
property SortDirection: TSortDirection read FSortDirection write SetSortDirection default sdAscending;

Description

SortDirection is a TSortDirection property which indicates the sort direction (or order) for the column in the SortColumn property. The value can be sdAscending for ascending sort order, or sdDescending for descending sort order. The default value for the property is sdAscending.

Changing the value for the property causes the Sort method to be called to display the items on the control in the selected sort order.

Use SortType to specify whether the text values, data values, or both are used to sort the list items. Set SortType to stNone to disable sorting in the control. Use SortColumn to set the column number with the values that are sorted.

Use AutoSort and AutoSortIndicator to automatically change the sort column and indicator when a column header is clicked on the control.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.