Cgridview Auto-Update After Create A Record

Hello all,

I have a CJuiDialog like this code below:




$this->beginWidget('zii.widgets.jui.CJuiDialog', array( 

    'id'=>'dialogOperation',

    'options'=>array(

        'title'=>'Add Operation',

        'autoOpen'=>false,

        'modal'=>true,

        'width'=>'auto',

        'height'=>'auto',

        'close'=> 'js: function(event, ui){ window.location = "'.Yii::app()->createUrl('operation/admin').'";}',

    ),

));



I tried to, instead "load" all the page, can i just load the CGridView? like deleteActions on the default admin page that created on Gii.

Sorry if my english is bad.

Thank you.

I was used this concept with iframe




<?php

/** Dialog Widget Start With IFrame **/

    $this->beginWidget('zii.widgets.jui.CJuiDialog', array(

    'id'=>'grid-dialog',

    'options'=>array(

        'title'=>'Detail view',

        'autoOpen'=>false,

        'modal'=>true,

        'width'=>'auto',

        'height'=>'auto',

        'close'=>'js:function(){ 

            /** We want this code to update the cgridview **/

                $("#grid-frame").attr("src","");

       	        $.fn.yiiGridView.update("subscriptionclaims-grid", {

                    data: $(this).serialize()

	           });

            

        }',

    ),

    ));

?>

<!-- Add Iframe -->

<iframe id="grid-frame" width="100%" height="100%"></iframe>

<?php

 

$this->endWidget();

/** Dialog Widget End **/

?>




Hello,

try this code after delete action.




$.fn.yiiGridView.update("grid-id");