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 property is relevant, if all necessary properties were set for sorting: column by which the values are sorted, sorting type and indicator of activated sorting.
Executing the example requires a form, a button named Button1 on it and the TreeList component named TreeList1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
TreeList1.SortType := ControlSortType.Text;
TreeList1.SortColumn := 0;
TreeList1.Sorted := True;
TreeList1.Columns.Item(TreeList1.SortColumn).SortAscending := False;
End Sub Button1OnClick;
After executing the example pressing the button sets sorting by values of the first column for the TreeList1 component. The descending sorting is performed for the values.
See also: