Difference between #5 and #6 of
Keeping a running total in a CGridView

Revision #6 has been created by tydeas_dr on May 2, 2011, 11:52:40 AM with the memo:

corrected syntax error
« previous (#5)

Changes

Title unchanged

Keeping a running total in a CGridView

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

CGridView

Content changed

[...]
public $type = 'number'; //If you want to be able to access it.
...
public function renderDataCellContent($row, $data) {
$this->_total += $data->{$this->attribute};

echo (isset($this->type)) ?
  $ $this->grid->getFormatter()->format($this->_total, $this->type) : this->_total; } } ```
22 0
19 followers
Viewed: 80 250 times
Version: 1.1
Category: How-tos
Tags: CGridView
Written by: Steve Friedl
Last updated by: tydeas_dr
Created on: Mar 12, 2011
Last updated: 13 years ago
Update Article

Revisions

View all history