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

GridBoundColumnGroupableSortBuilder

Methods

Compare(System.String)

A JavaScript function which is used to compare the groups (refer to sortable for sorting the items of the groups). It has the same signature as the compare function accepted by Array.sort.

Parameters

handler - System.String

The name of the JavaScript function that will be evaluated.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Filterable()
                   .Columns(columns =>
                   {
                       columns.Bound(c => c.Name).Groupable(grp=>grp.Sort(x=>x.Compare("compareByTotal")));
                   }))

Compare(System.Func)

A JavaScript function which is used to compare the groups (refer to sortable for sorting the items of the groups). It has the same signature as the compare function accepted by Array.sort.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Dir(Kendo.Mvc.ListSortDirection)

Sets the sort direction when grouping.

Parameters

value - ListSortDirection

The sort direction of the list.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Filterable()
                   .Columns(columns =>
                   {
                       columns.Bound(c => c.Name).Groupable(grp=>grp.Sort(x=>x.Dir(ListSortDirection.Ascending)));
                   }))

In this article
Not finding the help you need?