Created
May 19, 2013 23:33
-
-
Save tom--/5609552 to your computer and use it in GitHub Desktop.
Row number in a Yii CGridView. The row number is that of the row in the data provider's overall data set.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var CController $controller */ | |
$controller->widget( | |
'zii.widgets.grid.CGridView', | |
array( | |
'columns' => array( | |
array( | |
'header' => 'Row', | |
'value' => '$row + ($this->grid->dataProvider->pagination->currentPage | |
* $this->grid->dataProvider->pagination->pageSize)', | |
), | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment