KendoUI Hierarchy Grid shows wrong data
I had a json, similar to the following:
$("#grid").kendoGrid({
editable:true,
columns: [
{ field: "name" },
{ field: "address" }
],
[
{
name: "Beverages",
address: "street 1",
products: [
{ name: "Tea", price: 20 },
{ name: "Coffee", price: 23 }
]
},
{
name: "Food",
address: "street 2",
products: [
{ name: "Ham", price: 32 },
{ name: "Bread", price:34 }
]
}
],
detailInit: function (e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: e.data.products,
editable:true,
});
}
});
Those data I bring from sql server database. The master data load
correctly, but not the details. I do just what you see above. The first
record I select go well (any record I select first, doesn't matter it's de
first or last record in the grid). Then, any other go bad, or don't expand
or show this error message "Uncaught TypeError: undefined has no
properties". I could do a new database query and I guess that all be
working fine, but is more efficient if I bring all data in the first
request.
Any help it's welcome. Bye, Thx.
No comments:
Post a Comment