Hello Team Syncfusion,
I just now learned of this most amazing feature here:
https://blazor.syncfusion.com/documentation/datagrid/state-management#enabling-persistence-in-grid
Everything is perfect for me and works as expected, except for one wrinkle: I would like to save it for the user's session and not in the local storage. That is, I would prefer to use ProtectedSessionStorage rather than ProtectedLocalStorage.
Is this possible?
Thank you for any consideration and/or assistance.
Hi Mike-E,
Greetings from Syncfusion support.
We are not clear about your exact requirement. We would like to inform you that, by default when enabling persistence in grid, the persisted data will be stored in localstorage. This is our default architectural behavior. We have support to fetch the state of grid using the GetPersistData method. We suggest you to refer the below documentation for more details on the inbuilt state handling methods.
https://blazor.syncfusion.com/documentation/datagrid/state-management#handling-grid-state-manually
If we have misunderstood your requirement or if you are facing any difficulties then the following details would be helpful for us to proceed further.
The provided information will help us analyze the problem, and provide you a solution as early as possible.
Regards,
Renjith R
Hi Renjith. Thank you for your reply and for your patience as I try to explain to you the difference.
The primary difference between session storage and local storage is that local storage is essentially stored in the browser cache. That means when you close the browser and re-open it, the state is exactly how you left it.
With session storage, the state is saved per-session only. That means when you close the browser and reopen it, the state is lost. However, if you refresh the page and/or navigate back/forth from the state of the page, it is retained for the lifetime of the session.
For most scenarios, I find session state much more preferred as it doesn't save anything to the user's machine (thereby taking up memory/resources) and the grid state is preserved only for the particular session.
Ideally, the user should be able to select between using session storage, and localstorage.
BTW, to be 100% certain, I realize that you do not currently offer this functionality, and my intent here is to request a possible feature request to do so.
In the meantime I will investigate GetPersistData and see if it's possible to route it to `window.sessionStorage`.
Please do let me know if you have any further questions around this and I will do my best to answer them for you.
Thank you for any consideration.
Hi Renjith,
A quick update here. I was able to easily utilize `GetPersistData` and route grid data to and from window.sessionStorage. Even still, I feel it would be valuable to have this as a property on SfGrid that we can use to conveniently determine on a grid-per-grid basis whether we would like the state stored in localStorage or sessionStorage.
Thank you for any further consideration.
Hi Mike,
Thanks for the update.
Currently we are validating your query at our end and we will update further details within two business days on or before (14.07.2022). Until then we appreciate your patience.
Regards,
Monisha
Hi Mike-E,
We have considered it as a usability
improvement and logged a task “To store the component state in
window.sessionStorage instead of localStorage”.
At the planning stage for every release cycle, we review all open features
and identify features for implementation based on specific parameters including
product vision, technological feasibility, and customer interest. And this
improvement will be included in any of our upcoming releases.
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
You can also communicate with us regarding the open feature any time using our above feedback report page. We do not have immediate plan to implement this feature and it will be included in any of our upcoming releases. Please cast your vote to make it count. So that we will prioritize the improvement for every release based on demands.
Regards,
Naveen Palanivel.
Thank you so very much @Naveen and team! You are doing excellent work over there. 🙏🙏🙏
Hi Mike-E,
Welcome
Regards,
Naveen Palanivel.
What is that status of the request? We would like to persist our grid layout data to session storage also.
Hi Jim,
We checked your query and we are validating your query with develop team and we will update further details within two business days on or before (31.10.2022). Until then we appreciate your patience.
Regards,
Naveen Palanivel
Hi Jim
Thanks for patience,
Still we does not start this usability improvement and logged a task “To store the component state in window.sessionStorage instead of localStorage”. We will get back to us once it rolled out.
Please let us know if you have any concerns.
Regards,
Naveen Palanivel