By default we have only three option in admin view i.e view, update and delete. i want to add another option how can i do this any idea, how to change the CButtonColumn class??
By default we have only three option in admin view i.e view, update and delete. i want to add another option how can i do this any idea, how to change the CButtonColumn class??
Hi,
you can edit template option in cgridview, below code add option change password, and for change CButtonColumn class, you can extends from this call,
array(
'class'=>'CButtonColumn',
'template'=>'{view} {update} {delete} {changePass}',
'header'=>Yii::t('Base','Action'),
'htmlOptions'=>array('width'=>'90'),
'buttons'=>array(
'changePass'=>array(
'label'=>Yii::t('Base','ChangePassword'),
'imageUrl'=>Yii::app()->request->baseUrl.'/images/changePassword.png',
'url'=>'Yii::app()->createUrl("operator/changePassAdmin",array("id"=>$data->id))',
),
)
),
thanks i did that