ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.5.2 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / Sort Method / Sort(SortFlags,Int32,Int32) Method
C1.Win.C1FlexGrid.SortFlags value that specifies the sort direction and options.
First column in the range.
Last column in the range.

In This Topic
    Sort(SortFlags,Int32,Int32) Method
    In This Topic
    Sorts the grid contents based on a column range.
    Syntax
    'Declaration
     
    Public Overloads Overridable Sub Sort( _
       ByVal order As SortFlags, _
       ByVal col1 As Integer, _
       ByVal col2 As Integer _
    ) 
    public virtual void Sort( 
       SortFlags order,
       int col1,
       int col2
    )

    Parameters

    order
    C1.Win.C1FlexGrid.SortFlags value that specifies the sort direction and options.
    col1
    First column in the range.
    col2
    Last column in the range.
    Remarks

    When you sort multiple columns, the same sorting options are applied to each column, starting from the leftmost column in the range and proceeding to the right.

    To sort multiple columns using a different sorting order for each, you can either call the C1.Win.C1FlexGrid.C1FlexGridBase.Sort method multiple times or set each column's C1.Win.C1FlexGrid.Column.Sort property and call the C1.Win.C1FlexGrid.C1FlexGridBase.Sort method including the C1.Win.C1FlexGrid.SortFlags.UseColSort flag in the order parameter.

    See Also