Hello:
Is it possible to clear the rows collection and dataviewstate through the CSOM - preferrably on window.unload? I am currently developing a page that contains a webdatagrid that sits inside of a page that sits inside of a master page. When navigating away from the page with the grid, updating the data source (such as truncate the table during testing) and then returning to the page, all of the data is still there (even though I truncated the table on the database).
I put code in the Page_Load event of the page with the webdatagrid to clear the rows and bind the datasource but the Page_Load event does not fire when the user returns to the page.
Thank you,
Hello Dev_01,
Thank you for sharing. If you have futher questions, please let me know.
Actually, I found a better solution months ago on my own. I set the Response.Expires property to 0 and set the Page.Response.Cache.SetCacheability(HttpCacheability.NoCache) property. This ensures that each time the page is navigated to again, it is freshly loaded.
Thanks for the follow-up.
I suggest binding the grid at Pre_Rendering event.
If you have any questions, please let me know as well.