ITabCustomSortItem.Direction

Fore Syntax

Direction: TabCustomSortDirection;

Fore.NET Syntax

Direction: Prognoz.Platform.Interop.Tab.TabCustomSortDirection

Description

The Direction property determines sorting direction.

Fore Example

To execute the example a form with a button on it named Button1, the TabSheetBox component and the UiTabSheet component with the name UiTabSheet1 which is used as a data source for the TabSheetBox component are required.

    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.

Fore.NET Example

To execute the example a form with a button on it named Button1, the TabSheetBox component and the UiTabSheet component with the name UiTabSheet1 which is used as a data source for the TabSheetBox component are required.

Public Partial Class OBJ33041Form : Prognoz.Platform.Forms.Net.ForeNetForm
    
    CustomSort: ITabCustomSort;
    tab: ITabSheet;
    
    Public Constructor OBJ33041Form();
    Begin
        InitializeComponent();
    End Constructor;

    Private Sub button1_Click( sender : System.Object; e : System.EventArgs );
    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.TcsdAscending;
        tab.CustomSort.Item[0].Type := TabCustomSortType.TcsText;
        CustomSort.Sort();
    End Sub;

End Class;

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

See also:

ITabCustomSortItem