GridMessagesBuilder
Methods
NoRecords(System.String)
Sets the text that will be displayed when no records are present
Parameters
value - System.String
Defines the text of the "NoRecords" option that is rendered when no records are available in current view. The "NoRecords" options should be set.
RETURNS
Returns the current GridMessagesBuilder instance for method chaining.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Messages(m => m.NoRecords("No records"))
.NoRecords()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
ExpandCollapseColumnHeader(System.String)
Sets the expand collapse column header message
Parameters
value - System.String
Allows the customization of the text in the column header for the expand or collapse columns.
RETURNS
Returns the current GridMessagesBuilder instance for method chaining.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Messages(m => m.ExpandCollapseColumnHeader("E/C"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
GroupHeader(System.String)
Sets the group header message
Parameters
value - System.String
Allows the customization of the text when grouping a header.
RETURNS
Returns the current GridMessagesBuilder instance for method chaining.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Messages(m => m.GroupHeader("Group header"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
UngroupHeader(System.String)
Sets the ungroup header message
Parameters
value - System.String
Allows the customization of the text when ungrouping a header.
RETURNS
Returns the current GridMessagesBuilder instance for method chaining.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Messages(m => m.UngroupHeader("Ungroup header"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)