I am trying to add a DDL to a toolbar template, I have tried all sorts , including simple text in the toolbar.
But when I add the template , I always get a syntaxthe character befor the ampersand (@<text> as if the toolbar.template does not like the string as a paramater. What could be wrong here .
My current code is below
I have tried simple divs with text and other things , but the issue is always the same.
.ToolBar(toolbar =>
{
toolbar.Template( @<text>
<div class="toolbar">
@(Html.Kendo().DropDownList()
.Name("CityId")
.DataTextField("Name")
.DataValueField("Value")
.OptionLabel("Select City...")
.DataSource(source => source
.ServerFiltering(true)
.Custom()
.Transport(transport => transport
.Read(read =>
{
read.Url("/Api/Common/_GetCity/2")
.DataType("json");
})
)
)
)
</div>
</text>);
})