I am getting below error at .DetailView line. How do I bind the detailview grid?
the best overloaded method match for
Telerik.web.mvc.ui.fluent.GridDetailsViewBuilder.ClientTemplate(string)
has some invalid arguments
<%= Html.Telerik().Grid<Models.Employee>()
.Name("GridView1")
.BindTo(Model)
.Columns(columns =>
{
columns.Bound(o => o.EmpId).Width(100);
})
.DetailView(detailView => detailView.ClientTemplate(
Html.Telerik().Grid<Models.Employee>()
.Name("<#= EmpID #>")
%>
As the exception describes the ClientTemplate method expects a string. You can call the ToHtmlString() extension method at the end of the child Grid declaration.
Just like highlighted in this demo:
http://demos.telerik.com/aspnet-mvc/grid/hierarchyajax