Sorting is an important requirement when it comes to listing data alphabetically and arranging data in ascending or descending order. C1FlexSheet uses AllowSorting property to sort data in a worksheet.
You can easily sort data using AllowSorting property in XAML View. The following code illustrates the use of AllowSorting property:
XAML |
Copy Code
|
---|---|
<c1:C1FlexSheet x:Name="flexsheet" AllowDragging="Columns" AllowSorting="True" Margin="0,25,0,0"/> |
The following code illustrates the use of AllowSorting property in Code view:
The C1FlexSheet control also provides range-based unbound sorting. Sorting in FlexSheet can be done by using SortDialog class. The following lines of code show the unbound sorting in C1FlexSheet control:
The Sort dialog box provides options of adding, deleting, and copying levels. You can specify columns and their respective orders (ascending or descending) for sorting data in these levels.