Check All previous or next Checkbox in GridView
Requirements ¶
Yii 1.1 +
Instalation ¶
Extract the .zip file in your extension folder and enjoy
Usage ¶
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
array(
'id'=>'{NAME}',
'class'=>'ext.checkBoxPrevNextColumn.CheckBoxPrevNextColumn',
'orientation'=>'nextAll' //optional - default is prevAll
),
'title', // display the 'title' attribute
'category.name', // display the 'name' attribute of the 'category' relation
'content:html', // display the 'content' attribute as purified HTML
array( // display 'create_time' using an expression
'name'=>'create_time',
'value'=>'date("M j, Y", $data->create_time)',
),
array( // display 'author.username' using an expression
'name'=>'authorName',
'value'=>'$data->author->username',
),
array( // display a column with "view", "update" and "delete" buttons
'class'=>'CButtonColumn',
),
),
));
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.