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"))
)
)
StickyHeaders(System.Boolean)
When enabled the group header rows will stick to the top of the scrollable content area while scrolling through the group's data rows. Requires the scrollable option to be enabled.
Parameters
value - System.Boolean
The value for StickyHeaders
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID);
columns.Bound(p => p.Freight);
})
.Groupable(g => g.StickyHeaders(true))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
StickyFooters(System.Boolean)
When enabled the group footer rows will stick to the bottom of the scrollable content area while scrolling through the group's data rows. Requires the scrollable option to be enabled. The columns must have a groupFooterTemplate defined.
Parameters
value - System.Boolean
The value for StickyFooters
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID);
columns.Bound(p => p.Freight);
})
.Groupable(g => g.StickyFooters(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"))
)
)