PersistenceFramework "Token not valid" error

3 posts, 0 answers
  1. Ben
    Ben avatar
    23 posts
    Member since:
    Mar 2012

    Posted 18 Jul 2014 Link to this post

    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. Ben
    Ben avatar
    23 posts
    Member since:
    Mar 2012

    Posted 21 Jul 2014 in reply to Ben Link to this post

    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.
  3. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 22 Jul 2014 Link to this post

    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.
     
Back to Top