Hi,
I am trying to access the grid column in detail template and it's gives me invalid template.
The code look's like
@(Html.Kendo().Grid<MessageViewModel>()
.Name("messageGrid")
.Columns(columns =>
{
columns.Bound(e => e.MessageName);
columns.Bound(e => e.MessageSentTime);
columns.Bound(e => e.Message).Visible(false);
})
.Sortable()
.Pageable()
.Scrollable()
.Groupable()
.ClientDetailTemplateId("template")
.HtmlAttributes(new {style = "height:550px;"})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Read(read => read.Action("GetMessageGridData", "Home").Data("getGridData"))
))
<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().PanelBar()
.Name("Panel_#:Id#") // this id is from parent grid.
.Items(panelbar =>
{
panelbar.Add().Text("#:MessageName#")
.Expanded(false)
.Content("<pre>" + @Html.Raw(Html.Encode("#:Message#")) + "</pre>");
}).ToClientTemplate()
)
</script>
Please help me.