Fn.yiigridview.update, Update Partial


I am using

$.fn.yiiGridView.update("tprojets-grid", {data: $(this).serialize() })

But I would like to update the whole grid expect the first row.

How I can do that?

is it possible to do something after the grid has been updated complety ?


You can specify javascript callbacks in the beforeAjaxUpdate and afterAjaxUpdate properties. The afterAjaxUpdate callback is fired after the grid is updated with the new data.

afterAjaxUpdate doesn’t work for my issue.

I extends my gridView. I add a row to create a new row and I would like to keep the value for the next insert.

I attach a exemple with what I am trying to do.

code of my submit boutton :

                           echo CHtml::ajaxSubmitButton('Ajouter', $this->getController()->createUrl('/TRapportsActivites/Create'), array(

                                    'type' => 'POST',

                                    'dataType' => 'json',

                                    'data' => 'js:$("#TRapportsActivites").serialize()',

                                    'success' => 'js:function(data){ 



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

                                                data: $(this).serialize() 

//                                              success :function(data){alert($("#dateAdd").val()});










I find the solution :

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

        data: $(this).serialize(),

        complete: function(jqXHR, status) {

            if (status=="success"){