Hi,
I have a used CTabs, and inside the tab i have a gridview and i want to make an ajax call on the click of an button,
i had written the following code for it.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'test-sections-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'name',
array(
'class'=>'CButtonColumn',
'template'=>'{del}',
'buttons'=>array(
'del'=>array(
'label'=>'Delete',
'url' =>'Yii::app()->controller->createUrl("tests/delete",array("id"=>$data->id,))',
'click'=>"function() {
if(!confirm('Delete ?')) return false;
$.fn.yiiGridView.update('test-sections-grid', {
type:'POST',
url:$(this).attr('href'),
success:function(text,status) {
alert(text);
}
});
return false;
}",
),
),
),
),
)); ?>
Ajax call is working but its not updating the grid view…
its is showing me the loding icon,
but i am geting the contents in the alert box, as well as i had checked in the firebug
694
I had not modified the the actionDelete function
I have also attached an image of that…
Please help…
Thanks in advance…!!!