Difference between #2 and #1 of Cgridview counter column

unchanged
Title
Cgridview counter column
unchanged
Category
Tips
unchanged
Tags
serailNo in Cgridview, counterColumn in Cgridview
changed
Content
some times we want to show the serailNo on cgridview .

~~~
[php]
$this->widget('zii.widgets.grid.CGridView', array(
  
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
        array(
            'header'=>'Sr #',
           
'value'=>'$this->grid->dataProvider->pagination->currentPage *
$this->grid->dataProvider->pagination->pageSize + ($row+1)',
        ),
       ............
));
~~~
Write new article