ComponentOne FlexPivot for WinForms
FlexPivotSlicer Overview / Sorting
In This Topic
    Sorting
    In This Topic

    By default, the list containing the unique field values is sorted in an ascending order. However, to sort the list items by a different order, you can use SortOrder property of the C1FlexPivotSlicer class. The SortOrder property allows you to display the list items in ascending order, descending order or unsorted state by accepting values from the SortOrder enum.

    sorting-in-action

    Use the following code snippet to sort the checklist in descending order. This example uses the sample created in the Data Binding topic.

    'Sorts the checklist in descending order
    c1FlexPivotSlicer.SortOrder = System.Data.SqlClient.SortOrder.Descending
    'Displays the Sort button in the header
    c1FlexPivotSlicer.ShowSort = True
    
    //Sorts the checklist in descending order
    c1FlexPivotSlicer.SortOrder = System.Data.SqlClient.SortOrder.Descending;
    //Displays the Sort button in the header
    c1FlexPivotSlicer.ShowSort = true; 
    
    See Also