How can I display "line numbers" in a column of CGridView.
Note: These line numbers are not ID from database. These should be separate from it.
Can some one guide me in this regards.
Thanks in advance
How can I display "line numbers" in a column of CGridView.
Note: These line numbers are not ID from database. These should be separate from it.
Can some one guide me in this regards.
Thanks in advance
You can use $row for the value but it starts from 0 on every page
http://www.yiiframew…mn#value-detail
Thanks for reply.
How to display other than that. Like in normal does (not starting from 0 on each page).
Create a column like this
array(
'name'=>'id',
'value'=>'$this->grid->dataProvider->getPagination()->getOffset()+$row+1',
'header'=>'No.',
'filter'=>false,
),
This could be anything you need.
Cheers
Very nice, thanks