Reputation: 3443
I'm using Kendo ui for aspnet core MVC. And I can't find out how to set the placeholder text.
I'm configuring the grid search like this
.ToolBar(tools => tools.Search())
.Search(s => { s.Field(c => c.IncidentEvent); })
Is there a way to set the "Search..." text, without having to write custom Jquery code? I mean I know it can be achieved by doing:
$(".k-grid-toolbar .k-input")[0].placeholder = "Search Incident Event...";
But is there really no better and cleaner way?
Upvotes: 0
Views: 728
Reputation: 6111
ToolBar.Search.Text is what you're looking for: https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridToolBarSearchCommandBuilder#textsystemstring
The alternative would be to set the ToolBar.Search.Template and set it manually: https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridToolBarCommandFactory#templatesystemstring
Upvotes: 1