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

Sorting

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Theme Builder
  • sorting.cshtml
  • SortingController.cs

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

In this sample you can learn how to enable sorting for the Telerik MVC 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 MVC

More about the Telerik Grid for ASP.NET MVC

Support & Learning Resources