New to Telerik UI for Blazor? Download Free 30-day trial

Grid - Sorting

The second grid allows sorting by multiple fields. For example, try setting descending sorting on the "Discontinued" column, then sort by another column to see the difference in behavior with single-column sorting.

Grid with sorting enabled for a single column.

1 - 10 of 77 items

Grid with sorting enabled for multiple columns.

1 - 10 of 77 items
  • Sorting.razor
  • ProductService.cs
  • ProductDto.cs
Loading the demo source code...please wait.

Style in ThemeBuilder

  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming

Description

The Telerik Grid for Blazor allows you to sort its data by one or multiple fields in ascending and descending order. When you set the Sortable parameter of the component to true you will be able to click on the header of a column to apply sorting. In the second Grid on this demo, you can see that sorting is enabled for multiple columns. To achieve the same behavior in your own application set the SortMode to Multiple.
This Blazor Data Grid Sorting example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.