PDA

View Full Version : calculate grid column value with total value with first column in extjs4.1



vijayakumar84
22 May 2013, 8:50 AM
I have the grid with two column Taget and Target Percentage.I am getting Target value from store .I need to calculate Total Value for Target column and For Calculating Target percentage value by using Target/Target Total *100 .Can anybody tell How to do




E.g




Month Target Target %
Jan 50 Target /Target Total *100
Mon 50 Target/Target Total *100
Total 100


Thanks

friend
22 May 2013, 9:09 AM
Use a renderer (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.column.Column-cfg-renderer) on the desired grid column and you can do/return anything you like.