I've created a hierarchical grid which seemed like it was working properly until I started expanding multiple rows. In the attached screen shots if I click on row 5 it works, but then when I click on row 10 the data comes back under row 5 and row 10 is empty. I can reproduce this with any combination of rows.
The child grid is defined as follows
and the controller method as
I've attached the full files in the zip. This is my second Kendo grid and first hierarchical one so I'd appreciate any help.
Bill
The child grid is defined as follows
<
script
id
=
"template"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo().Grid<
Ebook2Web.PricingGridSvc.PricingGridDetail
>()
.Name("PricingGridDetail_#PricingGridId#")
.Columns(columns =>
{
columns.Bound(d => d.PricingGridDetailId);
columns.Bound(d => d.StartPrice);
columns.Bound(d => d.EndPrice);
columns.Bound(d => d.Price);
columns.Bound(d => d.TierId);
columns.Bound(d => d.ModifiedBy);
columns.Bound(d => d.ModifiedDate);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CreatePricingGridDetail", "PricingGrid", new { pricingGridId = "#=PricingGridId#" }))
)
.ToClientTemplate()
)
</
script
>
and the controller method as
public
ActionResult CreatePricingGridDetail(
int
pricingGridId, [DataSourceRequest] DataSourceRequest request)
{
var pricingGrid = PricingGrids.SingleOrDefault(x => x.PricingGridId == pricingGridId);
return
Json(pricingGrid.Details.ToDataSourceResult(request));
}
Bill