SortAscending: Boolean;
The SortAscending property determines the sorting direction. If the property is set to True, the ascending sort is executed, otherwise - the descending sort.
This property is relevant if all the following required properties are set: column by which the values are sorted, sorting type and indicator of enabled sorting.
Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1 and the UiDimension component, which is a data source for the DimensionTree1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
DimensionTree1.SortType := ControlSortType.Text;
DimensionTree1.SortColumn := 0;
DimensionTree1.Sorted := True;
DimensionTree1.Columns.Item(DimensionTree1.SortColumn).SortAscending := False;
End Sub Button1OnClick;
After executing the example on clicking the button the sort based on the first column values is set for the DimensionTree1 component. The descending sort of values will be executed.
See also: