I want the delete button to be active only in certain condition in CGgridView
CButtonColumn
(or make a custom delete button) e g if user=='admin'
or status=='draft'
. Any ideas? Thanks!
use 'visible' parameter -
'buttons'=>array
(
'delete' => array
(
'label'=>'Delete',
//other params
'visible'=>!Yii::app()->user->checkAccess('admin'),
),