I want to fix the repetitive number list problem in my gridview which every page the number list is always 1 untill 10 such as picture below.
Then I've search some tutorial and try this code below.
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'publikasi-grid',
'itemsCssClass' => 'items2',
'dataProvider'=>$model->searchARC(),
....
....
'columns'=>array(
array(
'header'=>'No.',
'type'=>'raw',
//'value'=> function ($this, $row){ return $row+1; },
'htmlOptions'=>array('style'=>'text-align: center;','class'=>'nomor'),
'headerHtmlOptions'=>array('style'=>'text-align: center;','class'=>'nomor'),
'value'=>'$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
),
.....
And it fail to appear.
Is there something wrong with my code or is there any way around this?
-Thnks-