Closed greeniee closed 9 years ago
try this:
columns.push({
id: "rowTotal",
name: "Total",
field: "rowTotal"
cssClass:"totals"
});
this.setRowTotal = function(item){
var rowTotal = 0;
for (var i = 0; i < 10; i++) {
rowTotal += item[i];
}
item.rowTotal = rowTotal;
}
this.getItem = function(index) {
item = (index < data.length) ? data[index] : totals;
this.setRowTotal(item);
return item;
};
thanks a lot !!... works fine ...
i want to get both row totals as well the COLUMNS TOTAL in the slickgrid... the rows total is possible from the available example... i am not able to figure out what must be changed in the existing code(of the example provided by slickgrid: example-totals-via-data-provider.html) so that i can get totals column in the grid..