SortAscending: Boolean;
The SortAscending property determines the direction of sorting.
If the property is set to True, the sorting is ascending, otherwise, the sorting is descending. The SortColumn property is used to specify the column by which the values are sorted.
Executing the example requires a form, a button named Button1 positioned on it and the ListView component named ListView1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
ListView1.SortType := ControlSortType.Text;
ListView1.SortColumn := 0;
ListView1.Columns.Item(ListView1.SortColumn).SortAscending := False;
End Sub Button1OnClick;
After executing the example pressing the button sets the sorting by values of the first column for the ListView1 component. The descending sorting is performed for the values.
See also: