Lets say I have a grid, in which I reference ClientDetailTemplateId("historyTemplate").
Then in my script template I have another grid. In that grid I have
columns.Bound(t => t.Id)
.Title(Jengo.Resources.Master.OperationsMsg)
.Width(100)
.ClientTemplate(
Html
.Kendo()
.Menu()
.Name("themenu\\#=Id\\#")
.Items(menu => menu.Add()
.Text("sometext")
.Items(sub =>
{
sub.Add()
.Url(Url.Action("Show", "Damage") + "/#= data.Id #")
.Text("anothertext");
})
)
.Orientation(MenuOrientation.Horizontal)
.HighlightPath(true)
.OpenOnClick(true)
.ToClientTemplate()
.ToHtmlString()
)
.HeaderHtmlAttributes(new { style = "text-align:center;width:100px;" });
}
Error I get on Chrome Console is 'Uncaught SyntaxError: Unexpected token ILLEGAL' Problem dissapears when I remove content of ClientTemplate (Html.Kendo.Menu...).
My question is - how can I make menu inside ClientTemplate inside Detail Template work? Did I miss some escape character?
Then in my script template I have another grid. In that grid I have
columns.Bound(t => t.Id)
.Title(Jengo.Resources.Master.OperationsMsg)
.Width(100)
.ClientTemplate(
Html
.Kendo()
.Menu()
.Name("themenu\\#=Id\\#")
.Items(menu => menu.Add()
.Text("sometext")
.Items(sub =>
{
sub.Add()
.Url(Url.Action("Show", "Damage") + "/#= data.Id #")
.Text("anothertext");
})
)
.Orientation(MenuOrientation.Horizontal)
.HighlightPath(true)
.OpenOnClick(true)
.ToClientTemplate()
.ToHtmlString()
)
.HeaderHtmlAttributes(new { style = "text-align:center;width:100px;" });
}
Error I get on Chrome Console is 'Uncaught SyntaxError: Unexpected token ILLEGAL' Problem dissapears when I remove content of ClientTemplate (Html.Kendo.Menu...).
My question is - how can I make menu inside ClientTemplate inside Detail Template work? Did I miss some escape character?