Example of Default Sorting in Blazor Pivot Table Component

Pivot Table / Sorting / Default Sorting

This sample demonstrates ordering fields in row and column axes either in ascending or descending order.

Properties
Fields:
Order:

In this sample, any field can be selected from the Fields dropdown list and its order can be changed to display headers either in ascending or descending order. It can be applied either through code-behind or UI. To achieve this in code-behind, set the EnableSorting property in PivotViewDataSourceSettings to true. Also, set the PivotViewSortSettings in the pivot table along with the following properties:

Name : Specifies the normal field.
Order : Specifies the sort order and it should be 'Ascending' or 'Descending' in this scenario.

To achieve the same through UI, either enable grouping bar or field list or both to perform the sorting operation.

More information on the label sorting feature can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE