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

GridGroupingSettingsBuilder

Methods

Messages(System.Action)

Configures messages.

Parameters

configurator - System.Action<GroupingMessagesBuilder>

The lambda which configures text messages displayed during grouping.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID);
                    columns.Bound(p => p.Freight);
                })
                .Groupable(g => g.Messages(m => m.Empty("Empty")))
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )

Enabled(System.Boolean)

Enables or disables filtering

Parameters

value - System.Boolean

When set to false grouping is considered disabled.

Example


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

ShowFooter(System.Boolean)

Specifies whether the footer should be displayed when the Group is collapsed

Parameters

value - System.Boolean

When enabled the group footer rows will remain visible when the corresponding group is collapsed.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID);
                    columns.Bound(p => p.Freight);
                })
                .Groupable(g => g.ShowFooter(true))
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )

Sort(System.Action)

Sets a sort configuration when grouping.

Parameters

configurator - System.Action<GridGroupableSortSettingsBuilder>

Sets the sort configuration when grouping.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID);
                    columns.Bound(p => p.Freight);
                })
                .Groupable(g => g.Sort(s => s.Compare("compare")))
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )

In this article
Not finding the help you need?