This is a migrated thread and some comments may be shown as answers.

Automatic save of persistence

4 Answers 143 Views
Persistence Framework
This is a migrated thread and some comments may be shown as answers.
Ole Oscar
Top achievements
Rank 1
Ole Oscar asked on 16 Jan 2015, 12:51 PM
Hi,
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

4 Answers, 1 is accepted

Sort by
0
Ole Oscar
Top achievements
Rank 1
answered on 19 Jan 2015, 01:14 PM
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.

Regards
Ole Oscar
0
Kostadin
Telerik team
answered on 21 Jan 2015, 08:35 AM
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)).

Regards,
Kostadin
Telerik
 

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.

 
0
n/a
Top achievements
Rank 1
answered on 05 Jul 2019, 08:37 AM

Hi Ole Oscar:

     

0
n/a
Top achievements
Rank 1
answered on 05 Jul 2019, 08:39 AM
i have the same problem. Do you have solved this problem. If you have solved,please share you idea.Thanks.
Tags
Persistence Framework
Asked by
Ole Oscar
Top achievements
Rank 1
Answers by
Ole Oscar
Top achievements
Rank 1
Kostadin
Telerik team
n/a
Top achievements
Rank 1
Share this question
or