Hi
I'm using a grid to show the results form a search and also "hierarchy" for details of each result. Every time I search the new values shows perfectly fine but the detailInit event is not working is I need. First time the details looks good but if I search again the details grid does not show and I noted that it is using data from previous search results. I assumed that the fact that it is not showing the details is because of that but not sure.
I have something like this:
function
search()
{
getDataSource();
createGrid();
}
function
createGrid()
{
$(
"#grid"
).kendoGrid({
...
detailInit: detailInit,
....
});
}
function
detailInit(e)
{
var
trackId = e.data.TrackingID;
// parent row value the one that is holding previous result
$(
"<div/>"
).appendTo(e.detailCell).kendoGrid({
dataSource:{
transport: {
read:
{
url:
"API_URL"
,
dataType:
"json"
,
type:
"POST"
},
parameterMap:
function
(data, type) {
var
result = {
trackingId: trackId,
}
return
kendo.stringify(result);
}
},
},
scrollable:
false
,
sortable:
true
,
pageable:
false
,
columns: [......]
});
}
Thank you