I have following hierarchical grid using template.
Ajax link does not work moment I add { UpdateTargetId = "mainBody" } to AJAX option.
It seems the client template doesn't like # in front of data-ajax-update [ data-ajax-update=\"#mainBody\"]
Any workaround, I tried replacing it with its unicode value but it din't worked.
Please help.
<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().Grid<STAR.EPIC.Models.GNMA.LoanViewModel>()
.Name("exceptionsGrid_#=ExceptionQueueId#")
.HtmlAttributes(new { style = "width:30%;" })
.Columns(columns =>
{
columns.Bound(p => p.id).Width(100)
.ClientTemplate(@Ajax.ActionLink("\\#=id\\#", "LoanDetail", "LoanDetail",
new
{
Id = "\\#=LoanNumber\\#",
}, new AjaxOptions() { UpdateTargetId = "mainBody" }).ToHtmlString());
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetLoansForException", "LoanCollection", new { ExceptionQueueId = "#=ExceptionQueueId#", }))
).ToClientTemplate()
)
</script>
Ajax link does not work moment I add { UpdateTargetId = "mainBody" } to AJAX option.
It seems the client template doesn't like # in front of data-ajax-update [ data-ajax-update=\"#mainBody\"]
Any workaround, I tried replacing it with its unicode value but it din't worked.
Please help.
<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().Grid<STAR.EPIC.Models.GNMA.LoanViewModel>()
.Name("exceptionsGrid_#=ExceptionQueueId#")
.HtmlAttributes(new { style = "width:30%;" })
.Columns(columns =>
{
columns.Bound(p => p.id).Width(100)
.ClientTemplate(@Ajax.ActionLink("\\#=id\\#", "LoanDetail", "LoanDetail",
new
{
Id = "\\#=LoanNumber\\#",
}, new AjaxOptions() { UpdateTargetId = "mainBody" }).ToHtmlString());
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetLoansForException", "LoanCollection", new { ExceptionQueueId = "#=ExceptionQueueId#", }))
).ToClientTemplate()
)
</script>