Hi,
I have requirement where on 1 main aspx page i have 3 user controls(ascx).
Each ascx has a radgrid.I need to save state of each grid in database individually on gridbutton click.
Tried- I have created a custom storage provider and implemented methods SaveStateToStorage and LoadStateFromStorage.
Now if I apply persistencemanger on any ascx and call .savestate it goes to SaveStateToStorage and all works fine.
But if I move persistencemanger to aspx and apply persistencemangerproxy on ascx nothing works.
Sample code-
on aspx- <telerik:RadPersistenceManager ID="mainPersistenceManager" runat="server"> </telerik:RadPersistenceManager>
on aspx.vb- pageload event - mainPersistenceManager.StorageProvider = New SettingsStorageProvider() 'This is my custom storage provider
on ascx- <telerik:RadPersistenceManagerProxy ID="PersistenceManagerProxy1" runat="server" UniqueKey ="1">
<PersistenceSettings>
<telerik:PersistenceSetting ControlID="radgrid1" />
</PersistenceSettings>
</telerik:RadPersistenceManagerProxy>
on ascx.vb- on button click event-
Dim ascxPersistenceManager As RadPersistenceManager
ascxPersistenceManager = RadPersistenceManager.GetCurrent(Page)
ascxPersistenceManager.PersistenceSettings.AddSetting("radgrid1")
SettingsStorageProvider.StorageProviderKey = Key
ascxPersistenceManager .SaveState()
Now on button click i get exception that it could not find control with id=radgrid1
but if i comment this line "ascxPersistenceManager.PersistenceSettings.AddSetting("radgrid1")"
somehow it calls "LoadStateFromStorage" of my custom storage provider rather than "SaveStateToStorage" method.
Incase when i dont use proxy and put persistencemanger in ascx only it hits correct method but not in case of proxy.
Please help
Thanks,
Ankita