I have the following problem. In my GridView I use POST. I use the Kartik gridview. If I now after data filter are also shown me this. But as soon as I go to page 2 I lose the data. Is there a possibility of Yii the data in the session to be saved? Or do I have to do this by hand?
where #myForm is id of your search form. So its ‘action’ attribute will be substituted by page link when you click it and form will be submitted preserving values of the fields.
You could try the new latest release of the yii2-dynagrid extension. This has been built to save, retrieve and personalize your GridView from the yii2-grid extension.
It allows you to save the grid filters, sorts, pagesize, column order, and grid theme style. You could use a storage type of SESSION, COOKIE, or DB.
Now the intent of this extension is to allow each user to personalize the grid (check the demo). Probably your use case is a bit different… however you could try setting for your use case, the storage to SESSION and attempt configuring the extension for storing the filter data across. Read about the new DynaGridStore object that allows you to fetch, save, and delete data for each dynagrid.
I’m having a similar issue but with the Yii2 GridView.
I’m using an Advanced Search system, and changing page or sorting an attribute from a filtered attributes list gives me incorrect results, as it is not considering my filter inputs.