I am using a nested grid. The nested grid is inside of script tags and looks like this. For some reason when rendering it throws "Unexpected Token '<'. Im unsure why. It renders fine if I pull it out and remove .ToClientTemplate()
<script id="template">
@(Html.Kendo().Grid<Student>()
.Name("Student#=Student_ID#")
.Width(1500)
.HtmlAttributes(new { style="margin-right:20px;height: fit-content;font-size:small" })
.Columns(columns =>
{
columns.Bound(o => o.StudentName).Width(300)
columns.Bound(o => o.TimeStamp).Width(300).Title("Date").Format("{0:G}");
columns.Bound(o => o.Details).Width(900);
})
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.PageSize(10)
.Read(read => read.Action("GetDetails", "Grid", new{ studentName= "#=StudentName#" }))
)
.Pageable(x => x.Refresh(true))
.Sortable()
.ToClientTemplate()
)
</script>