CGridView ajaxUpdate

When table updates by ajax, in firebug i see two equal requests(picture in atachments).


 public function actionUsers()


        $model =new Users('search');


         $model->attributes =$_GET['Users'];


       if(!isset($_GET['ajax'])) $this->render('users', array('model'=>$model));

	    else  $this->renderPartial('usersList', array('model'=>$model),false,true);


view users:

<? $this->renderPartial('usersList',array('model'=>$model),false,true);?>

view usersList:

<? $this->widget('zii.widgets.grid.CGridView', array(











								array('name'=>'reg_date','header'=>'Registration Date'),








need help.

Tell us more or check these two possible causes

  1. ajaxValidation=true in the form will generate two calls when submitting the form

  2. side effect of the fourth parameter to renderPartial (processOutput=true) loading scripts more than once


When I change page or apply filter, there are two equal requests, they return right data, but why they duplicate?

If I remove fourth parameter, ajax will not work at all, I get an error:

$.param.querystring is not a function.

There’s already tons of threads about this or similar problems. Since you didn’t post the whole view, all I can say is that you probably don’t have required scripts available on initial page load. I guess somebody with recent experience from this situation will soon post a better explanation.