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
Page 1 of 1
How to display line numbers in CGridView
#2
Posted 10 May 2010 - 08:23 AM
You can use $row for the value but it starts from 0 on every page
http://www.yiiframew...mn#value-detail
http://www.yiiframew...mn#value-detail
Find more about me.... btw. Do you know your WAN IP?
#3
Posted 10 May 2010 - 08:55 AM
Thanks for reply.
How to display other than that. Like in normal does (not starting from 0 on each page).
How to display other than that. Like in normal does (not starting from 0 on each page).
#4
Posted 05 June 2010 - 10:37 AM
Create a column like this
This could be anything you need.
Cheers
array( 'name'=>'id', 'value'=>'$this->grid->dataProvider->getPagination()->getOffset()+$row+1', 'header'=>'No.', 'filter'=>false, ),
This could be anything you need.
Cheers
Share this topic:
Page 1 of 1

Help













