Kendo.Mvc.UI.Fluent.GridBoundColumnSortableBuilder
Defines the fluent interface for configuring bound columns sortable options
Methods
AllowUnsort(System.Boolean)
Sets a value determining whether the column can be unsorted or not.
Example (ASPX)
<%= Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
columns.Bound(o => o.OrderDate)
.Sortable(sortable =>
sortable.AllowUnsort(false)
)
)
%>
Compare(System.Func<System.Object,System.Object>)
Sets а JavaScript function which is used to compare the values.
Example (ASPX)
<%= Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
columns.Bound(o => o.OrderDate)
.Sortable(sortable =>
sortable.Compare(
@<text>
function(a, b, descending) {
// compare logic
}
</text>
)
)
)
%>
Compare(System.String)
Sets а JavaScript function which is used to compare the values.
Example (ASPX)
<%= Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
columns.Bound(o => o.OrderDate)
.Sortable(sortable =>
sortable.Compare("compare")
)
)
%>
InitialDirection(Kendo.Mvc.ListSortDirection)
Determines the inital sort direction
Example (ASPX)
<%= Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
columns.Bound(o => o.OrderDate)
.Sortable(sortable =>
sortable.InitialDirection(ListSortDirection.Ascending)
)
)
%>