I have CButtonColumn in CGridView:
array(
'class' => 'CButtonColumn',
'template'=>'{document}',
'buttons'=>array(
'document'=>array(
'imageUrl'=>'icon.gif',
'url' => '($data->status=="1") ? Yii::app()->createUrl("site/getDocument") : "" ',
'click' => 'js:function() { alert("There isn't file");}'
),
),
),
But I want open will be opening alert only when $data->status=="1", but I can't insert php code in 'click'. So There is any possibility to do this?