Hi,
I'm trying to create an Hierarchy Grid with Local Data and I can't manage to pass the father ID to the Client Detail Template
for example
@(Html.Kendo().Grid(Model.Employees)
.Name("Employees")
.Columns(columns =>
{
columns.Bound(e => e.FirstName).Width(140);
columns.Bound(e => e.LastName).Width(140);
columns.Bound(e => e.Title).Width(200);
columns.Bound(e => e.Country).Width(200);
columns.Bound(e => e.City);
})
.ClientDetailTemplateId("employeesTemplate")
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
.Sortable()
)
<script id="employeesTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid(Model.Orders.Where(o=>o.employeeID == "#=EmployeeID#" ) )
//************* NOT WORKING *************
.Name("Orders_#=EmployeeID#")
.Columns(columns =>
{
columns.Bound(o => o.OrderID).Width(101);
columns.Bound(o => o.ShipCountry).Width(140);
columns.Bound(o => o.ShipAddress).Width(200);
columns.Bound(o => o.ShipName).Width(200);
})
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</script>
Please Help
I'm trying to create an Hierarchy Grid with Local Data and I can't manage to pass the father ID to the Client Detail Template
for example
@(Html.Kendo().Grid(Model.Employees)
.Name("Employees")
.Columns(columns =>
{
columns.Bound(e => e.FirstName).Width(140);
columns.Bound(e => e.LastName).Width(140);
columns.Bound(e => e.Title).Width(200);
columns.Bound(e => e.Country).Width(200);
columns.Bound(e => e.City);
})
.ClientDetailTemplateId("employeesTemplate")
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
.Sortable()
)
<script id="employeesTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid(Model.Orders.Where(o=>o.employeeID == "#=EmployeeID#" ) )
//************* NOT WORKING *************
.Name("Orders_#=EmployeeID#")
.Columns(columns =>
{
columns.Bound(o => o.OrderID).Width(101);
columns.Bound(o => o.ShipCountry).Width(140);
columns.Bound(o => o.ShipAddress).Width(200);
columns.Bound(o => o.ShipName).Width(200);
})
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</script>