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

RadGridViewSettings Sample & IsolatedStorage Fail in Non-ClickOnce Applications

6 Answers 215 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 24 Jul 2011, 01:32 PM
I would like to point out a few things with this sample (most current version of the controls):

Reload() Method

A catch {} is a really bad idea when someone wants to debug issues, especially if you finally get down to something like this:

System.IO.IsolatedStorage.IsolatedStorageException was caught
  Message=Unable to determine application identity of the caller.

Which after some extensive searching boiled down to that GetUserStoreForApplication works for Silverlight and ClickOnce apps (which seemingly the sample application provided by Telerik seems to be...)

Hidden Columns

http://www.telerik.com/community/forums/silverlight/gridview/radgridviewsettings-cs-no-hide-column-functionality.aspx

Answer is there, but not part of the implementation (today).

Which brings me to my final point:

http://doc.xceedsoft.com/products/XceedWpfDataGrid/Xceed.Wpf.DataGrid.v4.2~Xceed.Wpf.DataGrid.DataGridControl~LoadUserSettings.html

Samples are nice, but having built in functionality with a factored storage story is the only proper way. This already cost me two hours and might actually force me to use another control suite because of the ongoing problems I have with this sample.

Please consider adding load / save of the entire column state (including a Reset to XAML defaults). Via a property and a configurable persistence key (grids tend to be named identically in different forms here).

Chris

6 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 25 Jul 2011, 06:59 AM
Hello Christoph,

We have just released our own persistence framework which will take care of saving/restoring state of UI elements. You can get more information about it here and on our demos.


Best wishes,
Milan
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Christoph
Top achievements
Rank 1
answered on 25 Jul 2011, 10:53 AM
Ok, missed that new one. Is there a detailled documentation which properties are persisted? (e.g. in my specific case I don't want to persist filters and grouping)

In addition to that: user has modified the visual appearance. It has been saved and reloaded the next day. How would I go about and reset the control appearance back to the default? (XAML-defined appearance)

Thanks,
 Chris
0
Alex Fidanov
Telerik team
answered on 27 Jul 2011, 09:36 AM
Hi Christoph,

What visual appearance modifications do you have in mind? Please note that the persistence framework does not save style and templates. Other properties can be serialized, using the same approach as saving the columns, grouping, filter, etc settings. Please let us know if you have trouble saving a particular property or value.

Best wishes,
Alex Fidanov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Christoph
Top achievements
Rank 1
answered on 27 Jul 2011, 04:07 PM
I found out that it doesn't store the column order / filtering - still using the sample code therefore.

Let's say I have five data bound columns defined in XAML; user deselects three of them (and changes sorting + column widths on the remaining two). Now the user wants to go back to the "default layout" (the one she started out with, the one that the devs defined in the XAML) - how do I reset this in the *running* app (context menu, let's call the option "Reset to defaults").

Can this be done and how?

Chris
0
Tina Stancheva
Telerik team
answered on 01 Aug 2011, 06:49 PM
Hello Christoph,

There is a sample demo illustrating this scenario here. Event though the demo is for Silverlight, the sample approach can be used in WPF. Please have a look at it and let me know if this is what you had in mind.

Also you can find more information about the RadPersistenceFramework here or examine the other demos that illustrate its implementation.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Christoph
Top achievements
Rank 1
answered on 11 Aug 2011, 07:18 AM
I ended up refactoring the original sample to support multiple persistence providers and did the following:

on load of the grid store the defaults into memory
then load the user settings from disk

Thus I can go back to in the in-memory defaults at any time.

Chris
Tags
GridView
Asked by
Christoph
Top achievements
Rank 1
Answers by
Milan
Telerik team
Christoph
Top achievements
Rank 1
Alex Fidanov
Telerik team
Tina Stancheva
Telerik team
Share this question
or