I am trying to add a custom template to Kendo MVC grid. My template should contain 2 things
- Create button to add new record to the grid
- Autocomplete box to filter the data in the grid.
I am trying the following code :
.ToolBar(toolbar =>
{
toolbar.Template(@<text>
<div class="toolbar">
<label class="category-label" for="category">Filter by name:</label>
@(Html.Kendo().AutoComplete()
.Name("employees")
.DataTextField("empName")
.Filter("contains")
.MinLength(3)
.Events(e => e.Change("nameChange"))
.DataSource(ds =>
{
ds.Read("FilteringList", "Employee");
})
)
</div>
</text>);
toolbar.Create().Text("New Record");
})
but this is not working. I can only see the autocomplete box.
Any ideas on how I can accomplish my requirements?