Accumulated Column Sum
Accumulated Column Sum
Hello guys!
Is it possible so make an accumulated column? Like...
id | value | acc
1 | 10 | 10
2 | 2 | 12
3 | 5 | 17
4 | 20 | 37
I tried with fnrender... I need something like this:
[code]
"aoColumnDefs": [
{
"fnRender": function ( oObj ) {
Roww = oObj.iDataRow -1;
return oObj.aData[5] +' '+ oObj.aData[ Roww ][0];
},
"aTargets": [ 6 ]
}
],
[/code]
Is it possible so make an accumulated column? Like...
id | value | acc
1 | 10 | 10
2 | 2 | 12
3 | 5 | 17
4 | 20 | 37
I tried with fnrender... I need something like this:
[code]
"aoColumnDefs": [
{
"fnRender": function ( oObj ) {
Roww = oObj.iDataRow -1;
return oObj.aData[5] +' '+ oObj.aData[ Roww ][0];
},
"aTargets": [ 6 ]
}
],
[/code]
This discussion has been closed.
Replies
Allan
How do I get the row above ?
I thought oObj.aData[i-1][5] would work...
Allan