I can have afterdelete in cbuttoncolumn in cgridview by itself or I can have deleteconfirmation by itself but if I try to have both then only the afterdelete works. What I am trying to do is still have the javascript popup with are you sure you want to delete? and then after delete show the status messages like so"
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'events-grid',
'dataProvider'=>$model->search(),
'columns'=>array(
array(
'name'=>'event_date',
'value'=>array($this,'gridDate'),
),
'periods.description',
'title',
array(
'name'=>'event_goal',
'value'=>array($this,'gridNumber'),
),
array(
'name'=>'active',
'value'=>array($this,'gridActive'),
),
array(
'class'=>'CButtonColumn',
'deleteConfirmation'=>'Are you sure you want to delete this record',
'afterDelete'=>'function(link,success,data){ if(success) $("#statusMsg").html(data)',
),
),
)); ?>
Does anyone know how to make both of them work together or are the two parameters together incompatible with each other?