Telerik Extensions for ASP.NET MVC

Version Q1 2012, released 04/19/2012

Sorting

Sort by ...

Order ID(sorted ascending)Contact NameShip CountryOrder Date
10248Paul HenriotFrance07/04/1996
10249Karin JosephsGermany07/05/1996
10250Mario PontesBrazil07/08/1996
10251Mary SaveleyFrance07/08/1996
10252Pascale CartrainBelgium07/09/1996
10253Mario PontesBrazil07/10/1996
10254Yang WangSwitzerland07/11/1996
10255Michael HolzSwitzerland07/12/1996
10256Paula ParenteBrazil07/15/1996
10257Carlos HernándezVenezuela07/16/1996
Displaying items 1 - 10 of 830

About this example ASPXRazor

This example shows the sorting capability of Telerik Grid for ASP.NET MVC. To enable sorting use the Sortable method.

The user can sort by a single column or by multiple columns. To enable multiple column sorting use the SortMode method:

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Sortable(sorting => sorting
            .SortMode(GridSortMode.MultipleColumn)
        )
 %> 

The user can specify which columns to be initially sorted using the OrderBy method:

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Sortable(sorting => sorting
            .OrderBy(sortOrder => sortOrder.Add(o => o.OrderID).Descending())
        )
 %>    

Get more than expected!

Take the Telerik Extensions for ASP.NET MVC to your Visual Studio projects to truly experience their power. Download your free copy now and jumpstart your development with the available learning resources.

The Extensions are offered in both open source and commercial versions the differences between which are well explained in the licensing FAQ.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: