Get KoolPHP UI with 30% OFF!

Saving the state of the grid and loading when you return

Chris
We currently use jqGrid in our application and comparing them they are pretty similar. One thing that I can't see in your examples and documentation is the ability reset the grid to the status it was when last visited. So if you have sorted and filtered and leave the page, when you return it has the same sorting and filters?
Looks interesting though.
Posted Aug 13, 2015 Kool
David
Hi Chris,
It is possible to do that with the following command:
$grid->KeepViewStateInSession = true;

This would allow most of the states of the grid to be saved along with a browser's session. So you can close a tab and reopen it to find the grid with the same state as before. Let us know if you need anything more. Thanks!
Rgds,
Posted Aug 14, 2015 Kool
Chris
Thanks - when you say most I guess I need to try it but just to clarify - when you are saving for the session, if they come in the next day is it possible to load from the saved state or will it have been lost when you lose the browser session?
Thanks for the prompt reply.
Posted Aug 14, 2015 Kool
David
If you keep the browser opened then it will still be saved. However, if you close the browser or delete its session the state will be lost. Do you have any specific user case that you think this might not be enough? Thanks!
Rgds,
Posted Aug 14, 2015 Kool
Chris
Thanks for confirmation. Well currently it is sticky even when they close browser - the info is stored in local storage, so that which ever page they go into with a grid the information is sorted, filtered , number of rows as before. Within our application that they will want to same criteria on the different views every time, rather than having to change them every time for every grid.
Not a show stopper, and perhaps we can write our own code to save the session data, but useful to know.
Posted Aug 14, 2015 Kool