New to Telerik UI for ASP.NET Core? Download free 30-day trial

Sorting

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
HtmlHelper
TagHelper
Files:
sorting.cshtml
SortingController.cs
OrderViewModel.cs
Sorting_TagHelper.cshtml

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

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 sortable feature of the Telerik Grid for ASP.NET Core

More about the Telerik Grid for ASP.NET Core

Support & Learning Resources