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

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: 41 666 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: 12 years ago
Update Article

Revisions

View all history