When you want to make changes in a page of data, while navigating to another page, and want to see the modified data in the initial page of the browser while using enablePersistence, you can use window.localStorage.
Consider an example where you have rendered a grid in a page, with enablePersistence enabled, navigate to another page and dynamically add or remove a column from the grid model. When you navigate back to the page with the grid, the grid must reflect the changes made in the grid model.
You can achieve this requirement using the window.localStorage object. Local storage object stores large amounts of data, without affecting the website’s performance. The data stored in localStorage has no expiry.
You can get the localStorage values using the getItem method of the storage interface as shown in the following code example and pass it to server-side for modifications.
In server-side, after making the modifications in the grid model, you can return it to client-side to update the browser’s local storage with the updated value. You can refer to the following code examples on how to update the browser’s localStorage for grid control.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|