Automatic save of persistence

3 posts, 0 answers
  1. Ole Oscar
    Ole Oscar avatar
    18 posts
    Member since:
    Jun 2008

    Posted 16 Jan 2015 Link to this post

    The examples only gives the option of saving/loading of the state by buttons.
    i have added the persistence manager to the page.
    Is it possible for an persistence enabled control to save/load this automatically.
    For example if I creates a splitter and I change the position on the client and on the return after postback it will remain on the same position and if I close the application and open its it will remember that position ?
    At the moment it goes back to the original position after postback. Perhaps I have missed a setting on the splitter ?

    Best Regards
    Ole Oscar
  2. Ole Oscar
    Ole Oscar avatar
    18 posts
    Member since:
    Jun 2008

    Posted 19 Jan 2015 in reply to Ole Oscar Link to this post

    Hi again,
    I have found out why the splitter is not keeping its current size on postback. So do you know if it is possible to autosave the state on postback and also autload it on not postback. I am first of all thinking about the performance of doing it on each postback/load of page like windows form applications so that the user does not have to remember to hit some save/load buttons.

    Ole Oscar
  3. Kostadin
    Kostadin avatar
    1733 posts

    Posted 21 Jan 2015 Link to this post

    Hi Ole,

    The best approach is to load the saved state on the initial page load and save it when the page is closed or when navigating to another page. Note that it is not necessary to save the state on each postback since the state will be saved in the ViewState. Nevertheless if you want to save the state on each postback you can do that on Page_PreRender event handler and if you want to load the state on initial load you have to do that on Page_Load event and check whether the page is not postback (if(!IsPostBack)).


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top