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

DataSourceSortDescriptorBuilder

Methods

Ascending()

Declare an Ascending sorting rule.

Example


               @(Html.Kendo().DataSource<OrderViewModel>()
                  .Name("dataSource")
                   .Ajax(dataSource => dataSource
                      .Read(read => read.Action("Orders_Read", "DataSource"))
                      .Sort(s=>s.Add(x=>x.OrderID).Ascending())
                   )
            )

Descending()

Order(System.ComponentModel.ListSortDirection)

Declare a sorting rule.

Parameters

direction - System.ComponentModel.ListSortDirection

The System.ComponentModel.ListSortDirection

Example


               @(Html.Kendo().DataSource<OrderViewModel>()
                  .Name("dataSource")
                   .Ajax(dataSource => dataSource
                      .Read(read => read.Action("Orders_Read", "DataSource"))
                      .Sort(s=>s.Add(x=>x.OrderID).Order(ListSortDirection.Ascending))
                   )
            )

In this article
Not finding the help you need?