Cgridview Enablehistory


I’m trying to sort a CgridView, based on specific model PK, but when I click the sort links the last search criteria disappears. Seems that there is a param enableHistory to do so, but it doesn’t works in my case, continues fetching the whole model …

this is how it looks my code …


$model->Id = 666;

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


        'ajaxUrl' => Yii::app()->createUrl("/Mycontroller/admin/",array(





        'enableHistory' => true,







	public function search()




		return new CActiveDataProvider(get_class($this), array(



				'route'=> "Mycontroller/admin"



				'route'=> '/Mycontroller/admin',




if it can be accomplished by remembering the filters I know how, but would be very great if I can customize the first ajax or overwrite the cgridview js update call in order to send always the desired parameters. I only can do it refreshing the cgridview when the document is ready, but it’s not a good approach because that’s two calls…