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

PersistenceFramework "Token not valid" error

2 Answers 317 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 18 Jul 2014, 09:18 PM
I'm attempting to use the PersistenceFramework with a GridView control for the first time using the example shown here:
http://www.telerik.com/help/wpf/persistence-framework-getting-started.html

I'm importing the namespaces:
Imports Telerik.Windows.Controls
Imports Telerik.Windows.PersistenceFramework
Imports Telerik.Windows.Persistence.Storage

I have the StorageID set in my GridView:
<telerik:RadGridView Name="gvComp" telerik:StyleManager.Theme="Office_Black"  AutoGenerateColumns="False" FrozenColumnCount="3" telerik:PersistenceManager.StorageId="gvComp_Layout" EditTriggers="CellClick,TextInput,CurrentCellClick" ShowColumnFooters="True" ShowGroupFooters="True" VerticalAlignment="Stretch">

I'm saving and loading grid when the app closes and loading the grid when it opens:

Dim isoProvider As New IsolatedStorageProvider()
isoProvider.SaveToStorage()
 
Dim isoProvider As New IsolatedStorageProvider()
isoProvider.LoadFromStorage()

When LoadFromStorage() runs I get the error:  "Token not valid" 
Can someone please give me some idea what I've done wrong?  This seems really simple in the example.

Using this method will save the grid settings between application uses correct? 

Thank you for the help.

2 Answers, 1 is accepted

Sort by
0
Ben
Top achievements
Rank 1
answered on 21 Jul 2014, 09:37 PM
I would like to add, the RadGrid in my application is large and complex.  If you can give me an idea what "Token is not valid" might be referring to, it will give me some direction for troubleshooting. 

Really, all I want to persist is column order and filters.  Can I specify what grid criteria to persist within the framework?

Thank you for your help.
0
Zarko
Telerik team
answered on 22 Jul 2014, 01:26 PM
Hi Ben,
I already answered the support thread and I'd like to paste my answer here so that other clients with similar problems may read it:
"Due to the complexity of the RadGridView we advice our clients to save it with a CustomPropertyProvider. We have an online demo that shows how to do this and I've also attached a sample application so could you please examine it and if you have more questions feel free to ask."

Regards,
Zarko
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Ben
Top achievements
Rank 1
Answers by
Ben
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or