GridSortableSettingsBuilder

Methods

Enabled(System.Boolean)

Enables or disables sorting.

Parameters

value - System.Boolean

If set to true the user could sort the grid by clicking the column header cells. By default sorting is disabled.

RETURNS

Returns the current GridSortableSettingsBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);
                })
                .Sortable(s => s.Enabled(true))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              

AllowUnsort(System.Boolean)

If set to true the user can get the grid in unsorted state by clicking the sorted column header.

Parameters

value - System.Boolean

The value for AllowUnsort

RETURNS

Returns the current GridSortableSettingsBuilder instance.

ShowIndexes(System.Boolean)

If set to true the user will see sort sequence indicators for sorted columns.

Parameters

value - System.Boolean

The value for ShowIndexes

RETURNS

Returns the current GridSortableSettingsBuilder instance.

InitialDirection(System.String)

Determines the inital (from un-sorted to sorted state) sort direction. The supported values are asc and desc.

Parameters

value - System.String

The value for InitialDirection

RETURNS

Returns the current GridSortableSettingsBuilder instance.

SortMode(Kendo.Mvc.UI.GridSortMode)

Defines the sort modes supported by Kendo UI Grid for ASP.NET MVC

Parameters

value - GridSortMode

The value for SortMode

RETURNS

Returns the current GridSortableSettingsBuilder instance.