Reputation: 231
Is there any way to set up new message for the Kendo UI Grid from a ASP.NET MVC code ? I'm stuck with a Kendo.Mvc.UI.Fluent.FilterableMessagesBuilder object that I need to pass to the messages method. So what should I pass in the Messages method to change the value ?
@(
Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(col =>
{
col.Bound(p => p.Id);
col.Bound(p => p.FirstName);
col.Bound(p => p.LastName);
col.Bound(p => p.Address);
col.Bound(p => p.Zip);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable(filter => filter.Messages(Kendo.Mvc.UI.Fluent.FilterableMessagesBuilder
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
)
Upvotes: 0
Views: 2432
Reputation: 2760
.Filterable(filterable => filterable.Messages(messages =>
{
messages.Info("Custom header text"); // sets the text on top of the filter menu
messages.Filter("CustomFilter"); // sets the text for the "Filter" button
messages.Clear("CustomClear"); // sets the text for the "Clear" button
}))
Please look at Kendo Documentation (search for Localization of the filter menu)
Localization of the filter menu
Upvotes: 1