ITreeControl.Sorted

Syntax

Sorted: Boolean;

Description

The Sorted property determines whether it is possible to sort values by column specified in the SortColumn property and in the Sort method.

Comments

If the property is set to True, sorting is executed, otherwise, it is not executed.

The SortColumn property and the Sort method are not relevant without using the Sorted property.

The Sorted property is not relevant if the SortType property is set to None.

Example

Executing the example requires a form with the Button1 button and the TreeList component named TreeList1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Begin

TreeList1.SortType := ControlSortType.Text;

TreeList1.SortColumn := 0;

TreeList1.Sorted := True;

End Sub Button1OnClick;

After executing the example clicking the button sorts the elements of the TreeList1 component by the first column. Sorting is executed in alphabetical order because the SortType property is set to Text.

See also:

ITreeControl

ITreeControl.SortColumn

ITreeControl.SortType

ITreeControl.Sort

ITreeControl.SortDefault