ITabCustomSortItem.Direction

Syntax

Direction: TabCustomSortDirection;

Description

The Direction property determines sorting direction.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component and the UiTabSheet component named UiTabSheet1, that is used as a data source for the TabSheetBox component.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        CustomSort: ITabCustomSort;
    Begin
        CustomSort := tab.CustomSort;
        CustomSort.Range := tab.Table;
        CustomSort.Add(Tab.ColumnIndex("A"));
        text := CustomSort.Count.ToString;
        tab.CustomSort.CaseSensitive := True;
        CustomSort.Item(0).Direction := TabCustomSortDirection.Ascending;
        tab.CustomSort.Item(0).Type := TabCustomSortType.Text;
        CustomSort.Sort;
        tab.CustomSort.IsColumnSort := False;
    End Sub Button1OnClick;

Click the button in a column that has index A to set up ascending sorting.

See also:

ITabCustomSortItem