Pivot Table / Sorting / Value Sorting

Blazor Pivot Table Example - Value Sorting

Loading Syncfusion Blazor Server Demos…

This sample demonstrates how to order column and row header values in ascending or descending order. The example shows ordering of the FY 2022 -> In Stock column header and the France row header by defining sort-related settings in the code-behind.

This sample also demonstrates how to enable interactive sorting for column and row values by clicking their headers. Repeated clicks toggle between ascending and descending sort directions. This functionality is activated by setting the EnableValueSorting property in SfPivotView to true.

You can also configure value-based sorting programmatically for precise control. To sort a column, specify the target header using the ColumnHeaderText property under PivotViewValueSortSettings, with individual header levels separated by a delimiter configured in the HeaderDelimiters property. Use ColumnSortOrder to specify the sort direction. Similarly, for row sorting, provide the header in RowHeaderText and specify the direction using RowSortOrder.

This approach enables precise and independent control over sorting behavior for both columns and rows based on the specified headers.

For detailed information about the value sorting feature, refer to the value sorting documentation.

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