Telerik Forums
UI for Silverlight Forum
8 answers
103 views
I'm using the Persistence framework to save and load RadDocking and a TreeView to Isolated Storage. I'm using a custom property provider for RadDocking and is working fine.
After a few saves, I'l get an error "New quota must be larger than the old quota exception" (see attached image). Once this happens I cannot save to Isolated Storage again.  I'm wondering if this is a problem on Telerik's side or am I supposed to catch this error and do something.
Dilyan Traykov
Telerik team
 answered on 26 Sep 2018
2 answers
60 views

Hello,

Can you place a setting or property on certain controls to have them ignored during the saving/restoring using the PersistenceFramework?

We use the PersistenceFramework mainly for saving a RadDock layout. Within this RadDock contains a control which contains a RadMenu. The headers of some of the RadMenuItems are dynamic based on what you last clicked. The layout restore is wiping away the current header (or state) and applying the one saved within the PersistenceManager stream. This appears to the user that the UI is in a bad state as it's incorrectly stating what you last clicked.

Can this easily be stopped or ignored, at least on RadMenus?

Thank you,

Patrick

Patrick
Top achievements
Rank 1
 answered on 17 Jul 2017
15 answers
252 views
I created a small sample application that has a RadDocking and RadTreeView control. I moved the docking panes around and save the layout using:
IsolatedStorageProvider isoProvider = new IsolatedStorageProvider();
isoProvider.SaveToStorage();
I restart the application and load the storage information and the RadDocking control is all incorrect. Please see attached before and after images.
Here is my test application: http://dl.dropbox.com/u/15525269/TelerikPersistence.zip

Am I using the telerik:PersistenceManager.StorageId attribute incorrectly?

jeroentjeathome
Top achievements
Rank 1
 answered on 12 Aug 2015
7 answers
166 views
Hi,

I have a problem storing both RadGridView and RadDocking to IsolatedStorage. When I just have the grid it works fine, but when I add in the docking it doesn't work. I copied the demos online with the CustomProperties, but it still isn't working use both of them. I have a storage id for RadDocking with serialization tags for both panes, and I have a storage id for the grid.

For the grid I have:

ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RadGridView), new GridViewCustomPropertyProvider());
Application.Current.Exit += (_, __) =>
                                            {
                                                try
                                                {
                                                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
                                                    {
                                                        // 0.1 MB of isolated storage space is needed
                                                        var spaceNeeded = 1024*1024*0.1;
                                                        if (store.AvailableFreeSpace < spaceNeeded)
                                                        {
                                                            store.Remove();
                                                        }
 
                                                        IsolatedStorageProvider provider = new IsolatedStorageProvider();
                                                        provider.SaveToStorage();
                                                    }
                                                }catch(IsolatedStorageException){}
                                            };
 
            radGridView.Loaded += (_, __) =>
                                      {
 
                                          try
                                          {
                                              using (var store = IsolatedStorageFile.GetUserStoreForApplication())
                                              {
                                                  // 0.1 MB of isolated storage space is needed
                                                  var spaceNeeded = 1024 * 1024 * 0.3;
                                                  if (store.AvailableFreeSpace < spaceNeeded)
                                                  {
                                                      store.Remove();
                                                  }
                                              }
 
                                              IsolatedStorageProvider provider = new IsolatedStorageProvider();
                                              provider.LoadFromStorage();
                                          }
                                          catch (IsolatedStorageException)
                                          {
                                          }
                                      };
 
This works for when the user loads the grid, the data is loaded. However if I do something similar for RadDocking, it doesn't remember:

ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RadDocking), new DockingCustomPropertyProvider());
 
 
            Application.Current.Exit += (_, __) =>
            {
                try
                {
                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
                    {
                        // 0.1 MB of isolated storage space is needed
                        var spaceNeeded = 1024 * 1024 * 0.1;
                        if (store.AvailableFreeSpace < spaceNeeded)
                        {
                            store.Remove();
                        }
 
                        IsolatedStorageProvider provider = new IsolatedStorageProvider();
                        provider.SaveToStorage();
                    }
                }
                catch (IsolatedStorageException) { }
            };
 
            radDocking.Loaded += (_, __) =>
            {
 
                try
                {
                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
                    {
                        // 0.1 MB of isolated storage space is needed
                        var spaceNeeded = 1024 * 1024 * 0.3;
                        if (store.AvailableFreeSpace < spaceNeeded)
                        {
                            store.Remove();
                        }
                    }
 
                    IsolatedStorageProvider provider = new IsolatedStorageProvider();
                    provider.LoadFromStorage();
                }
                catch (IsolatedStorageException)
                {
                }
            };


If I could get an attachment of a project demonstrating how to store both when both load at different times from IsolatedStorage, that would be great.

[edit]The grid doesnt remember anything and the docking control literally blinks when they both are in my solution[/edit]

Oh yea, I forgot to mention I am using the RadGridView in one of the panes that in the documenthost.
Thanks,
Bryce
Zarko
Telerik team
 answered on 20 Jan 2015
1 answer
41 views
We've upgraded Silverlight 5.

Now we can't seem to save the order of our columns when someone rearranges them.

The error we receive is a FileNotFoundException:

Could not load file or assembly 'System.Xml.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bk3856ad364e35' or one of its dependencies. The system cannot find the file specified.

(Screenshot attached)

I've referenced System.Xml.Serialization, but its version is 5.0.5.0, not 2.0.5.0.
Zarko
Telerik team
 answered on 06 Oct 2014
3 answers
66 views
I'm using the PersistenceFramework (and associated sample code, e.g. GridViewCustomPropertyProvider) to save user customizations made to a RadGridView. The class GridViewCustomPropertyProvider makes an assumption that the contents of column.Header property will be some sort of string value. This is also evidenced by the type for Header in the ColumnProxy, that is, a String. Has anyone seen this as a limitation, and be willing to share what they've used as a workaround?
Thanks,
Chuck
Jeff
Top achievements
Rank 1
 answered on 04 Feb 2014
1 answer
73 views
Hi, I have a problem with the PersistanceFramework when I use IsolatedStorageProvider, I have a RadGridView with the StorageId setted to (telerik:PersistenceManager.StorageId="GridDeTareas"), and the code to Load and Save is too easy like you have in Silverlight Demos...
private void btnGuardarConfiguracion_Click(object sender, RoutedEventArgs e)
{
    IsolatedStorageProvider iso = new IsolatedStorageProvider();
    iso.SaveToStorage();
}
private void btnCargarConfiguracion_Click(object sender, RoutedEventArgs e)
{
    IsolatedStorageProvider iso = new IsolatedStorageProvider();
    iso.LoadFromStorage();
}

I can't find the way to this works fine... If something is wrong or missing, please tell me...

Regards...
Sami
Zarko
Telerik team
 answered on 31 Oct 2013
1 answer
50 views
I need to know when the PersistenceManager has finished loading using the Load command.
Is there an event I can catch which is thrown when loading is done?
Thanks,
Anne
Pavel R. Pavlov
Telerik team
 answered on 25 Sep 2013
1 answer
38 views
Hi,
i have implemented persistence framework to save radgridview setttings to isolated storage for this i am using

IsolatedStorageProvider provider = new IsolatedStorageProvider();
provider.SaveToStorage();
to save gridsettings to storage and  this to load grid settings

 PersistenceManager.SetStorageId(gvWorkAllocation, grid_persistence_key);

  IsolatedStorageProvider provider = new IsolatedStorageProvider();
                provider.LoadFromStorage(grid_persistence_key);

Every thing is working absolutely fine ,the only problem ,its saving for every single radgrid in the memory,
which takes lot of time .

In my case i am showing user data in different child windows ,once i close one child Window(A) on unloaded
event i am saving the radgridview settings ,and now if I open another ChildWindow(B) and close it ,persistence framework
saves settings for both radgrids on the both window A and B.
can you please tell me any solution to fix this problem ,probably u can provide a function which saves
setting for a specific key .
kind regards

Pavel R. Pavlov
Telerik team
 answered on 17 Sep 2013
3 answers
1.5K+ views
Hi, 

we have Silverlight 4 project with RadTileView component and on it a couple of tiles,with RadGridView controls etc...

Depending on the layout of our page we get the error when trying to save layout.
It happens only in certain scenarios,and we couldn't find the reason why it might be.

The error is:
System.InvalidOperationException
"There was an error generating the XML document."

Stack trace:

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
at Telerik.Windows.Persistence.Serialization.Serializer.Serialize(Object obj)
at Telerik.Windows.Persistence.PersistenceManager.Save(Object obj)
at InsaSLPortalApp.ContentPage.PersistLayout()
at InsaSLPortalApp.ContentPage.ContentPage_Unloaded(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)


InnerException:
The type System.Collections.Generic.KeyValuePair`2[[System.String, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] was not expected. Use the XmlInclude attribute to specify types that are not known statically.

The version of the PersistanceFramework is: 2011.2.712.1040

Thank you,
Igor
Zarko
Telerik team
 answered on 20 May 2013
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?