I have a usercontrol, categoryTree, for which I want to save it's state (namely whether checkboxes in a RadTreeView are checked) across sessions. So I have added this to the main page:
<telerik:RadPersistenceManager ID="RadPersistenceManager1" runat="server">
</telerik:RadPersistenceManager>
And this to categoryTree.aspx:
<telerik:RadPersistenceManagerProxy ID="RadPersistenceManagerProxy1" runat="server">
<PersistenceSettings>
<telerik:PersistenceSetting ControlID="RadTreeView1" />
</PersistenceSettings>
</telerik:RadPersistenceManagerProxy>
And this to the codebehind:
private RadPersistenceManager _persistenceManager;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
_persistenceManager = RadPersistenceManager.GetCurrent(Page);
if (!IsPostBack)
_persistenceManager.LoadState();
}
(and in the event for checked nodes):
_persistenceManager.SaveState();
But after I restart the page, the previous state does not get loaded. What am I missing?
<telerik:RadPersistenceManager ID="RadPersistenceManager1" runat="server">
</telerik:RadPersistenceManager>
And this to categoryTree.aspx:
<telerik:RadPersistenceManagerProxy ID="RadPersistenceManagerProxy1" runat="server">
<PersistenceSettings>
<telerik:PersistenceSetting ControlID="RadTreeView1" />
</PersistenceSettings>
</telerik:RadPersistenceManagerProxy>
And this to the codebehind:
private RadPersistenceManager _persistenceManager;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
_persistenceManager = RadPersistenceManager.GetCurrent(Page);
if (!IsPostBack)
_persistenceManager.LoadState();
}
(and in the event for checked nodes):
_persistenceManager.SaveState();
But after I restart the page, the previous state does not get loaded. What am I missing?