Yii::CGridView – Generate row number

Posted: May 25, 2011 in Yii Framework

Yii::CGridView – Generate row number

<code>$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)',      ),
      'emp_no',
      'emp_name',
    ),  ));</code>
Comments
  1. sher says:

    useful tips.. thnx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s