DataSourceSortDescriptorFactory

Methods

Add(System.Linq.Expressions.Expression)

Adds a sort descriptor for the specified property expression.

Parameters

expression - System.Linq.Expressions.Expression<Func>

The property expression.

RETURNS

A sort descriptor builder for further configuration.

Add(System.String)

Adds a sort descriptor for the specified field name.

Parameters

fieldName - System.String

The name of the field to sort by.

RETURNS

A sort descriptor builder for further configuration.

Add(System.String)

Add field based on which the data will be sorted.

Parameters

memberName - System.String

Example

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