ITreeListColumn.SortAscending

Syntax

SortAscending: Boolean;

Description

The SortAscending property determines a direction of sorting.

Comments

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.

Example

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 clicking the button sets sorting by values of the first column for the TreeList1 component. The descending sorting is executed for the values.

See also:

ITreeListColumn

ITreeControl.SortColumn

ITreeControl.Sorted

ITreeControl.SortType