I’m using the CGridView to display a list of Alerts. I have at the end of each row a view and a dismiss buttons. I was wondering how can I get the dismiss button to work with Ajax and not having to refresh the page every time I dismiss an alert (which is what it’s doing right now)?
following is my code:
array(
'class'=>'CButtonColumn',
'template' => '{view}',
'viewButtonUrl'=>'Yii::app()->createUrl("issue/view", array("id" => $data["object_id"]))',
// 'updateButtonUrl'=>'Yii::app()->createUrl("/vehicle/update", array("id" => $data["id"]))',
'header' => 'View',
'viewButtonImageUrl'=>'images/view.png',
),
array(
'header' => 'Dismiss',
'type' => 'html',
'value' => 'CHtml::link(CHtml::image("images/alert_dismiss.png", "Dismiss", array("title"=>"Dismiss")), array("dashboard/dismissAlert", "id"=>$data->id, ))',
'filter' => VFFormUtil::getFilter(VFFormUtil::ISSUE_SEVERITY),
'htmlOptions' => array('style'=>'text-align: center; width: 60px'),
),