ITabRange.SortRows

Syntax

SortRows(ColumnIndex: Integer; Ascending: Boolean);

Parameters

ColumnIndex. Index of the column which values determine how the rows are to be sorted.

Ascending. The parameter that determines sorting direction. If the parameter is set to True, the values are sorted in ascending order.

Description

The SortRows method sorts a row range based on the values from the column with the ColumnIndex index.

Comments

After executing the method, the rows are rearranged in such a way that the values in the ColumnIndex column are sorted depending on the sorting order.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component named TabSheetBox1 and a data source for TabSheetBox.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        TabSheetBox1: TabSheetBox;
        Range: ITabRange;
    Begin
        Range := TabSheetBox1.Source.GetTabSheet.Rows(09);
        Range.SortRows(0True);
    End Sub Button1OnClick;

After executing the example clicking the button sorts the first ten rows of the table by values of the first column.

See also:

ITabRange