FWIW, in 11.1.20111.2054, a grid's persisted settings seem to take precedence over what's in XAML (presumably earlier builds too). I noticed this today when I added a GroupByItemTemplate to one of my columns and it didn't seem to work. After clearing the isolated storage area for my PC, I re-ran the app and everything of course worked as expected. Unfortunately, this makes for a very messy deployment - i.e. my app is already in use - so to get my new group by template to show up, I'll have to contact all users and tell them how to clear their isolated storage and also pass on the bad news that the setting preferences for all their grids will need to be redone.
I realize I could add code to my app to clear the storage and perhaps even merge in their old settings but this seems like a fairly major design flaw. I love the fact that the grid can persist/restore all its settings in so few lines of code, but not being able to change my XAML and have those changes show up automatically after the grid has been restored from persistence makes it fairly useless except for one and done type apps where the grid's XAML will never be changed over the life of the application.
Thoughts???
HI,
Can you produce a small isolated sample application that replicates this issue?
Sincerely, Matt Developer Support Engineer
Thanks. See attached - the steps to reproduce are in Titles.xaml.
Hi MolallaComm,
Thanks for your sample.
I will review it and get back to you by Friday.
HI MolallaComm,
This is expected behavior.
You could look into using PersistenceSetting's SavePeresistenceOptions and LoadPersistenceOptions.
Here is a help link to Persistence settings:
http://help.infragistics.com/NetAdvantage/Silverlight/2011/1/CLR4.0/?page=Persistence_Persistence_Settings.html
I am following up on this thread.
Please let me know if you need further assistance.
Sincerely,
Matt Developer Support Engineer
Hi,
In order to prevent the loss of your changes after a persisted state is loaded, you should implement your own form of versioning and only reload the persisted state if it is the correct version. Your customers do not have to clear isolated storage, just don’t load, if the version is not the current version.
Sincerely,MattDeveloper Support Engineer
HI MotallaComm,
I will bring this issue up with my Team Lead.
I will keep you posted with my progress.
Sincerely, Matt Developer Supprort Engineer
Well, a good example that shows how to persist everything but those settings that I want whatever is in the XAML to override. I setup up the SavePropertyPersistence event and was a bit overwhelmed by the sheer number of things that are being persisted and while I appreciate your link to the documentation - I don't find any description of the various PropertyPaths and what each means so I put the issue on the back burner as figuring it out by trial and error will be difficult due to the sheer number of properties being persisted. Any help you could lend would be appreciated - at this point the main problem for me is that my TextColumn.GroupByItemTemplates gets blown away if I use persistence.