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.
Example
@(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
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
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
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