Example of Value Sorting in Blazor Pivot Table Component
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.
Grand Total |
---|
Grand Total | No records to display |
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.