I have problem for calculate the balance every row. for example :
1. product A amount(100) balance(100)
2. product B amount( 50) balance(150)
3. product C amount( 30) balance(180)
the problem is i must call stupid function every row
please help me/us
Page 1 of 1
Cgridview Balance Amount
#2
Posted 12 October 2012 - 01:38 PM
/* Moved from Feature Requests to General Discussion */
Perhaps you could be a bit more careful about where you post your questions?
Perhaps you could be a bit more careful about where you post your questions?

"Less noise - more signal"
#3
Posted 12 October 2012 - 10:39 PM
This might be what you want: http://www.yiiframew...in-a-cgridview/
#4
Posted 15 October 2012 - 02:40 AM
compact_corpse, on 12 October 2012 - 10:39 PM, said:
This might be what you want: http://www.yiiframew...in-a-cgridview/
Thanks save my time .. ^^
public function gridBankBalance($data,$row) { $this->balance += $this->gridBankAmnt($data,$row); return $this->balance; }
#5
Posted 14 March 2015 - 02:03 AM
the said example does work on a single page result of a query, but when applied to query result having multiple pages the running total became per page only. Is it possible to make the running total for the whole query itself rather than just a running total for that page only?
Share this topic:
Page 1 of 1