If you wanted to have a running total grid column based on the amounts in another column, couldn't you use a renderer function in the running total grid column?
COLA..........COLB (running total)
100.00.......100.00
100.00.......200.00
100.00.......300.00
350.00.......650.00
etc
etc
this is close, but I have something wrong... Or is there a better/easier way to do it?
COLA..........COLB (running total)
100.00.......100.00
100.00.......200.00
100.00.......300.00
350.00.......650.00
etc
etc
this is close, but I have something wrong... Or is there a better/easier way to do it?
Code:
renderer: function(value, metaData, record, row, col, store, grid) { var cumulativeAmt = 0; for (i = 0; i < store.data.items.length; i++) { cumulativeAmt += record.get('COLA'); if( i >= (row-1)){ return Ext.util.Format.usMoney(cumulativeAmt); } } }
Comment