In my Yii web application, I want to disable update link for first two values in CButtonColumn. How to resolve this. My Cgridview is,
Please help me.
Alright, You can use "visible"
attribute for this button in your CButtonColumn
and pass a PHP expression (within single quotes) to control when it gets shown and when it doesn't:
For example, the object having attribute "name" equal to "Full-Time Contract"
not be shown.
array(
'class'=>'CButtonColumn',
'template'=>'{update} {view}',
'buttons'=>array(
'update'=>array(
'visible'=>'($data->name !== "Full-Time Contract")'
),
),
)
You can adapt it according to your needs.