• Material 3
  • Fluent
  • Bootstrap v5
  • Tailwind CSS
  • High Contrast
Preferences
Theme Selection
Theme Modes
Mode Selection
Touch
Mouse
Localization
*Translated by Google Translator.
Currency

Example of Value Sorting in ASP.NET MVC Pivot Table Control

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.

DEMO
SOURCE

You can sort column values by clicking the column header. Clicking the same header once again will reverse the sorting direction. It can be enabled by setting the enableValueSorting as 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 valueSortSettings, 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 property headerDelimiters. The sorting direction is performed by the sortOrder property.

Transform your ASP.NET MVC web apps today with Syncfusion ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE