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

Example of Sorting API in ASP.NET Core Tree Grid Control

This sample demonstrates the usage of sorting API in TreeGrid. Through property panel, we can sort/unsort the columns using corresponding sorting API.

DEMO
SOURCE
Column
Direction

Sorting feature enables us to order the data in a particular direction. It can be enabled by setting the allowSorting as true.

To sort a TreeGrid column simply click the column header. The icons (ascending) and (descending) specifies the sort direction of a column.

By default, multi-sorting is enabled in TreeGrid, to sort multiple column hold CTRL key and click the column header. To clear sort for a column, hold SHIFT key and click the column header.

While using TreeGrid in a touch device, you have an option for multi sorting in single tap on the treegrid header. By tapping on the treegrid header, it will show the toggle button in small popup with sort icon. Now tap the button to enable the multi-sorting in single tap.

In this demo, select the column and direction from the properties panel then click the Sort button. Use the Clear button to remove sort for the selected column.

More information on the data binding can be found in this documentation section.

Transform your ASP.NET Core web apps today with Syncfusion® ASP.NET Core components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab