Example of Value Sorting in Blazor Pivot Table Component

Pivot Table / Sorting / Value Sorting

This sample demonstrates ordering of values in ascending or descending order. Here, the FY 2015 -> In Stock column header text is ordered by defining sort-related settings in code behind.

You can sort column values by clicking the column header. Clicking the same header once again will reverse the sorting direction. To do so, enable the EnableValueSorting property in SfPivotView to true.

Value sort-related settings can be defined in code behind too. To do so, headers of the column to be sorted are given in the HeaderText property under PivotViewValueSortSettings, separated by a delimiter string. The purpose of providing complete header text here is to indicate exactly which value column needs to be sorted. The string which is used to separate the headers is given in the HeaderDelimiters property. The sorting direction is performed by the SortOrder property.

More information on the value 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