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

OnSaveCustomSettings for RadPersistenceManagerProxy

1 Answer 58 Views
Persistence Framework
This is a migrated thread and some comments may be shown as answers.
Felix
Top achievements
Rank 1
Felix asked on 24 Jun 2015, 08:56 PM

Hi

I use the RadPersistenceManagerProxy because I use MasterPages. All works fine!

Because I need to persist the RadDateTimePicker, which is not supported, I want to save it manually with the OnSaveCustomSettings function. How can I use this approach in child page will mean with the RadPersistenceManagerProxy?

Regards

Felix

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 29 Jun 2015, 10:22 AM
Hello Felix,

Generally you can attach the SaveCustomSettings and LoadCustomSettings events directly to the RadPersistenceManager which I suppose is located in the MasterPage. This way the events will be fired when save or load the state from the content page.
Another possible solution is to access the
RadPersistenceManager from code behind of the content page and attach the events. For this purpose you can use the following approach.
protected void Page_Load(object sender, EventArgs e)
{
    RadPersistenceManager manager = RadPersistenceManager.GetCurrent(Page);
    manager.SaveCustomSettings += manager_SaveCustomSettings;
    manager.LoadCustomSettings += manager_LoadCustomSettings;
}
 
void manager_LoadCustomSettings(object sender, PersistenceManagerLoadStateEventArgs e)
{
    throw new NotImplementedException();
}
 
void manager_SaveCustomSettings(object sender, PersistenceManagerSaveStateEventArgs e)
{
    throw new NotImplementedException();
}

Regards,
Kostadin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Persistence Framework
Asked by
Felix
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or