Using "telerik:PersistenceManager.StorageId" with derived GridView class

3 posts, 0 answers
  1. Michael Hilgers
    Michael Hilgers avatar
    76 posts
    Member since:
    Apr 2010

    Posted 21 Aug 2013 Link to this post

    Hello everyone,

    i've a project with several radGridViews. Now i'd like, that the user settings in the gridViews (in my case the colum order) will be saved and restored on the next load of the application.

    For this, i'm using the IsolatedStorageProvider.Load/SaveFromStorage() functions and this all works pretty fine. The settings are saved on gridView.Unloaded and restored on gridView.Loaded.

    Now i didn't want to implement the Loaded and Unloaded events for EVERY SINGLE gridView in my project, because that's not the good way of programming and maintainability. So i created a derived gridView class called "SuSGridView".

    Here it's code:

    public partial class SusGridView : RadGridView
            public SusGridView()
                : base()
                this.Loaded += new RoutedEventHandler(SusGridView_Loaded);
                this.Unloaded += new RoutedEventHandler(SusGridView_Unloaded);
            void SusGridView_Loaded(object sender, RoutedEventArgs e)
                IsolatedStorageProvider isoProvider = new IsolatedStorageProvider();
            void SusGridView_Unloaded(object sender, RoutedEventArgs e)
                IsolatedStorageProvider isoProvider = new IsolatedStorageProvider();

    Now when i change the XAML of one of my pages holding a grid from "<telerik:radGridView .....> to "<my:SusGridView ....>", it crashes on loading in designer and on loading on runtime with the following error:

    Die Anwendungsidentität des Aufrufers kann nicht bestimmt werden.
       bei System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type appEvidenceType)
       bei System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type applicationEvidenceType)
       bei Telerik.Windows.Persistence.Storage.IsolatedStorageProvider.GetIsolatedStoreOverride() in c:\TB\105\WPF_Scrum\Release_SL\Sources\Frameworks\Persistence\Storage\IsolatedStorageProvider.cs:Zeile 267.
       bei Telerik.Windows.Persistence.Storage.IsolatedStorageProvider.LoadFromStorage(String[] fileNames) in c:\TB\105\WPF_Scrum\Release_SL\Sources\Frameworks\Persistence\Storage\IsolatedStorageProvider.cs:Zeile 178.
       bei Telerik.Windows.Persistence.Storage.IsolatedStorageProvider.LoadFromStorage() in c:\TB\105\WPF_Scrum\Release_SL\Sources\Frameworks\Persistence\Storage\IsolatedStorageProvider.cs:Zeile 164.
       bei MPWS.Controls.SusGridView.SusGridView_Loaded(Object sender, RoutedEventArgs e) in D:\Entwicklung\C#\Projects\MPWS\MPWS\Controls\SusGridView.xaml.cs:Zeile 20.
       bei MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       bei MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
    (the second row of the error message is in german and means something like "the application identity of the caller cannot be determinded")

    If i remove the "telerik:PersistenceManager.StorageId="nameOfGridView"" property, it works exactly flawless like before with the "<telerik:radGridView ....>" except the save and restore functionality of the user settings (because now the StorageId is missing). So the  property "StorageId" seems not to work with derived gridView classes??

    Anyone faces or facing the same problem and knows a solution?

    Kind regards,
  2. Michael Hilgers
    Michael Hilgers avatar
    76 posts
    Member since:
    Apr 2010

    Posted 22 Aug 2013 Link to this post

    No ideas, even not from the Telerik Team?
  3. DevCraft R3 2016 release webinar banner
  4. Yoan
    Yoan avatar
    1051 posts

    Posted 26 Aug 2013 Link to this post

    Hi Michael,

    I have already answered you in the other thread you have posted on the same subject.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top