Have you decided this? If not, I offer you the following solution
$this->widget( 'zii.widgets.grid.CGridView', array( 'columns'=>array( array( 'header'=>'No.', 'value'=>'$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', ), ), ));
basically you can access current pages and page size variables from a dataparauder, and you use it to calculate the row number for all the data. Why $ row + 1? because $ row starts at 0. Hope this helps: D
Zaq
source share