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.

1Chai18.00003910 boxes x 20 bagsFalse
2Chang19.00001724 - 12 oz bottlesFalse
3Aniseed Syrup10.00001312 - 550 ml bottlesFalse
4Chef Anton's Cajun Seasoning22.00005348 - 6 oz jarsFalse
5Chef Anton's Gumbo Mix21.3500036 boxesTrue
6Grandma's Boysenberry Spread25.000012012 - 8 oz jarsFalse
7Uncle Bob's Organic Dried Pears30.00001512 - 1 lb pkgs.False
8Northwoods Cranberry Sauce40.0000612 - 12 oz jarsFalse
9Mishi Kobe Niku97.00002918 - 500 g pkgs.True
10Ikura31.00003112 - 200 ml jarsFalse

Grid with sorting enabled for multiple columns.

1Chai18.00003910 boxes x 20 bagsFalse
2Chang19.00001724 - 12 oz bottlesFalse
3Aniseed Syrup10.00001312 - 550 ml bottlesFalse
4Chef Anton's Cajun Seasoning22.00005348 - 6 oz jarsFalse
5Chef Anton's Gumbo Mix21.3500036 boxesTrue
6Grandma's Boysenberry Spread25.000012012 - 8 oz jarsFalse
7Uncle Bob's Organic Dried Pears30.00001512 - 1 lb pkgs.False
8Northwoods Cranberry Sauce40.0000612 - 12 oz jarsFalse
9Mishi Kobe Niku97.00002918 - 500 g pkgs.True
10Ikura31.00003112 - 200 ml jarsFalse
  • Sorting.razor
  • ProductService.cs
  • Product.cs
Loading the demo source code...please wait.

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.

Support & Learning Resources

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