Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SheetView Class / SortRows Method / SortRows(Int32,Boolean,Boolean) Method
Column whose values are compared during sorting
Whether the sort is ascending
Whether to display the sort indicator

In This Topic
    SortRows(Int32,Boolean,Boolean) Method
    In This Topic
    Sorts all the rows in the sheet according to the specified parameters.
    Public Overloads Function SortRows( _
       ByVal keyColumn As Integer, _
       ByVal ascending As Boolean, _
       ByVal showIndicator As Boolean _
    ) As Boolean
    Dim instance As SheetView
    Dim keyColumn As Integer
    Dim ascending As Boolean
    Dim showIndicator As Boolean
    Dim value As Boolean
    value = instance.SortRows(keyColumn, ascending, showIndicator)
    public bool SortRows( 
       int keyColumn,
       bool ascending,
       bool showIndicator


    Column whose values are compared during sorting
    Whether the sort is ascending
    Whether to display the sort indicator

    Return Value

    true if successful; otherwise false

    This is the simplest of the methods to sort rows. You need only specify the following:

    • the column to use as a key for sorting
    • whether the sort is ascending or descending
    • whether to show the sort indicator in the column header or not

    All the rows in the sheet are sorted.

    This example illustrates the use of this member by sorting the rows with the specified parameters.
    FarPoint.Web.Spread.SheetView sv;
    FarPoint.Web.Spread.SortInfo[] s = new FarPoint.Web.Spread.SortInfo[1];
    s[0] = new FarPoint.Web.Spread.SortInfo(0, false);
    sv = FpSpread1.ActiveSheetView;
    sv.SortRows(0, False, True);
    Dim sv As FarPoint.Web.Spread.SheetView
    Dim s(1) As FarPoint.Web.Spread.SortInfo
    s(0) = New FarPoint.Web.Spread.SortInfo(0, False)
    sv = FpSpread1.ActiveSheetView
    sv.SortRows(0, False, True)
    See Also