New to Telerik UI for ASP.NET Core? Download free 30-day trial
Sorting
Loading Demo...
- EXAMPLE
- VIEW SOURCE
-
EDIT IN TELERIK REPL
-
Change Theme
default
- Main
- Main Dark
- Nordic
- Ocean Blue
- Purple
- Turquoise
- Main
- Main Dark
- Nordic
- Urban
- Vintage
- Main
- Arctic
- Lime Dark
- Main Dark
- Nova
- Main
- Main Dark
- Opal
- Silver
HtmlHelper
TagHelper
sorting.cshtml
SortingController.cs
OrderViewModel.cs
Sorting_TagHelper.cshtml
Also available for:
CLIENT-SIDE API SERVER-SIDE APIDescription
In this sample you can learn how to enable sorting for the Telerik for ASP.NET Core Grid. Since this functionality is built-in, all you have to do is to set the sorting configuration via the
.Sortable()
method. The supported sorting modes are single, multiple and mixed, and can be specified through the SortMode method by passing a GridSortMode
- SingleColumn
, MultipleColumn
or Mixed
.- Single-column sort:
.Sortable(sortable => sortable.SortMode(GridSortMode.SngleColumn)
- Multi-column sort:
.Sortable(sortable => sortable.SortMode(GridSortMode.MultipleColumn)
- Mixed-column sort:
.Sortable(sortable => sortable.SortMode(GridSortMode.Mixed)
More about the Telerik Grid for ASP.NET Core