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:
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:
(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,
Michael
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();
isoProvider.LoadFromStorage();
}
void
SusGridView_Unloaded(
object
sender, RoutedEventArgs e)
{
IsolatedStorageProvider isoProvider =
new
IsolatedStorageProvider();
isoProvider.SaveToStorage();
}
}
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:
System.IO.IsolatedStorage.IsolatedStorageException
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)
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,
Michael