IListViewColumn.SortAscending

Syntax

SortAscending: Boolean;

Description

The SortAscending property determines the direction of sorting.

Comments

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.

Example

Executing the example requires a form, the Button1 button on the form, 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, clicking the button sets the sorting by values of the first column for the ListView1 component. The descending sorting is executed for the values.

See also:

IListViewColumn