How to do not reset search results in Yii zii.widgets.grid.cgridview

150 views Asked by At

I have zii.widgets.grid.cgridview on admin page, and when I search some records and visit view one of them, and after return to admin page results is reseted. May I save them someway?

1

There are 1 answers

0
Ali MasudianPour On BEST ANSWER

As a suggestion:

First disable Ajax update in your CGridView's view:

'ajaxUpdate' => false

Now, it sends data via GET request. If you save the current GET, it would be possible to use the result later. It is accessible with:

$_GET['YOUR_MODEL_NAME'];

If you want to use it in somewhere else, you can get values from GET and put it into a CDBCriteria.

Others might offer another way.