indexcolumn

Index in Admin
2 followers

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',
        ),
    ),
)); ?>

Total 1 comment

#15687 report it
hippyjim at 2013/12/07 12:13pm
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.

Leave a comment

Please to leave your comment.

Create extension