I have many rows in Kendo detailed grid and I am trying to show the sum of the detailed rows in outer grid's data cells. Is there any way I can do so ?
Asked
Active
Viewed 509 times
1 Answers
0
Hi I have created an example for you in this example i am showing total of first grid's columns into second grid's cell.
code:-
//calucalte the total of value column of first grid and create new data
var total=0;
var data=$("#grid").data("kendoGrid").dataSource.data();
$.each(data,function(i,row)
{
total+=row.value;
});
//create dataSource for new grid
var source=[{"total":total}];
//create new grid here
$("#grid2").kendoGrid({
dataSource: source,
schema: {
model: {
id: "id",
fields: {
total: { type: "number", editable: false },
}
}
},
});
working example:-http://jsfiddle.net/mga6f/287/
thanks

Devendra Soni
- 1,924
- 12
- 16