For index in ADMIN view you can use this extension
Just copy to your extensions folder, And put below code to your admin view.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'user-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
** array(
'header'=>'#',
'class'=>'application.extensions.indexColumn.IndexColumn',
),
** ...........
...........
array(
'class'=>'CButtonColumn',
),
),
)); ?>
Neat little column type
Nice neat little column type - good work. It could probably do with a bit more explanation here and maybe some code comments in the source. I had to download to figure out what it did.
For those wondering what this does - it provides an "item number" for each item in a CGridView. Also works with other CGridView based widgets such as TbGridView.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.