Hi
I have an EditorTemplate which contains a Kendo DropdownList as below and the editortemplate is called inside one of my kendo UI grid’s column.
In my data I have “#” which cause having Invalid Template error.
I checked the below link which explains we have to escape the “#” by using “\\#” in JavaScript and “\#” in Html Script:
http://docs.telerik.com/kendo-ui/getting-started/framework/templates/overview
I replaced the “#” in server side to “\\#” then the template was created without any issue but when I click on dropdown to select an item the text contains “\\#” .
How can I escape the “#” in above code without making any changes on server side.
Thanks.
I have an EditorTemplate which contains a Kendo DropdownList as below and the editortemplate is called inside one of my kendo UI grid’s column.
@model int?
@{ var controlName = ViewData.TemplateInfo.GetFullHtmlFieldName("");}@( Html.Kendo().DropDownListFor(m => m) .Name(controlName) .OptionLabel("Not Mapped") .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"]) .HtmlAttributes(new { data_value_primitive = true }))In my data I have “#” which cause having Invalid Template error.
I checked the below link which explains we have to escape the “#” by using “\\#” in JavaScript and “\#” in Html Script:
http://docs.telerik.com/kendo-ui/getting-started/framework/templates/overview
I replaced the “#” in server side to “\\#” then the template was created without any issue but when I click on dropdown to select an item the text contains “\\#” .
How can I escape the “#” in above code without making any changes on server side.
Thanks.