# Sorting

This topic covers the sorting feature in FlexPivotSlicer.

## Content

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](/componentone/api/win/online-flexpivot/dotnet-framework-api/C1.Win.FlexPivot.Slicer.4.8/C1.Win.FlexPivot.C1FlexPivotSlicer.SortOrder.html) property of the [C1FlexPivotSlicer](/componentone/api/win/online-flexpivot/dotnet-framework-api/C1.Win.FlexPivot.Slicer.4.8/C1.Win.FlexPivot.C1FlexPivotSlicer.html) 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](https://cdn.mescius.io/document-site-files/images/78f24d1c-0e57-452f-87a1-d318e186587a/images/gifsortingv2.gif)

Use the following code snippet to sort the checklist in descending order. This example uses the sample created in the [Data Binding](/componentone/docs/win/online-flexpivot/features/flexpivotsliceroverview/databinding) topic.

```vbnet
'Sorts the checklist in descending order
c1FlexPivotSlicer.SortOrder = System.Data.SqlClient.SortOrder.Descending
'Displays the Sort button in the header
c1FlexPivotSlicer.ShowSort = True
```

```csharp
//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

[Using FlexPivotSlicer](/componentone/docs/win/online-flexpivot/features/Filtering/usingflexpivotslicer)