Unplanned
Last Updated: 04 Jun 2021 08:22 by ADMIN
Leo
Created on: 17 May 2018 15:23
Category: UI for ASP.NET MVC
Type: Feature Request
2
Add MVC wrappers support TemplateId(string id) for Grid Toolbar
Many widgets offer functionality to define a template (header, row, toolbar or whatever) by an id, such a way that the id refers to a html section that actually contains the template like:
<script id="idOfSomeTemplate" type="text/x-kendo-template"> 
<!-- template contents --> 
</script> 

I use this a lot because it's easy to use and whenever the widget is part of another widget (common example: a grid part of a tabstrip) Razor /C# won't allow you to do nested inline markup blocks (@<text> </text>). With the above template it's possible to define the tempalte outside the nested inline block.
Now it seems the MVC wrappers don't have the possiblity to do this for the grid toolbar template. 
TLDR:
I would have expected this templateid method:
@(Html..Kendo().Grid<T>() 
.Name("Grid") 
.ToolBar(toolbar => 
{ 
toolbar.TemplateId("idOfSomeTemplate") 
}) 
) 
0 comments