Spread WPF 16
GrapeCity.Windows.SpreadSheet.Data Namespace / Worksheet Class / SortRange Method
The index of the starting row of the block of cells to sort.
The index of the starting column of the block of cells to sort.
The number of rows in the block of cells.
The number of columns in the block of cells.
Set to true to sort by rows; false to sort by columns.
The SortInfo object with sort criteria and information about how to perform the sort.
Example


In This Topic
    SortRange Method
    In This Topic
    Sorts a range of cells in this sheet in the data model.
    Syntax
    'Declaration
     
    Public Function SortRange( _
       ByVal row As Integer, _
       ByVal column As Integer, _
       ByVal rowCount As Integer, _
       ByVal columnCount As Integer, _
       ByVal byRows As Boolean, _
       ByVal sortInfo() As SortInfo _
    ) As Boolean
    'Usage
     
    Dim instance As Worksheet
    Dim row As Integer
    Dim column As Integer
    Dim rowCount As Integer
    Dim columnCount As Integer
    Dim byRows As Boolean
    Dim sortInfo() As SortInfo
    Dim value As Boolean
     
    value = instance.SortRange(row, column, rowCount, columnCount, byRows, sortInfo)
    public bool SortRange( 
       int row,
       int column,
       int rowCount,
       int columnCount,
       bool byRows,
       SortInfo[] sortInfo
    )

    Parameters

    row
    The index of the starting row of the block of cells to sort.
    column
    The index of the starting column of the block of cells to sort.
    rowCount
    The number of rows in the block of cells.
    columnCount
    The number of columns in the block of cells.
    byRows
    Set to true to sort by rows; false to sort by columns.
    sortInfo
    The SortInfo object with sort criteria and information about how to perform the sort.

    Return Value

    true if the data is successfully sorted; otherwise, false.
    Example
    This example uses the SortRange method.
    See Also