Cgridview Balance Amount

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

[color="#006400"]/* Moved from Feature Requests to General Discussion */[/color]

Perhaps you could be a bit more careful about where you post your questions? ;)

This might be what you want:

Thanks save my time … ^^

	public function gridBankBalance($data,$row)


		$this->balance += $this->gridBankAmnt($data,$row);

		return $this->balance;


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?