Can someone please help me with a xamGrid serialization issue? As I understand it the only built-in way to persist customizations to a xamGrid is to use the persistence framework.***
I'm using "OnlySpecified" persistence options as follows:
<!-- Get occurrences of these "Settings". Very big XML... -->
<ig:PropertyNamePersistenceInfo PropertyName="FilteringSettings" Options="Contains"/>
<ig:PropertyNamePersistenceInfo PropertyName="FilterColumnSettings" Options="Contains"/>
<!-- Get column keys - important for supporting changes over time -->
<ig:PropertyNamePersistenceInfo PropertyName="Columns[].Key" Options="Contains"/>
The purpose of this is to serialize only the column filters. The problem I'm finding is that the ContextMenu of the XamGrid is included in the serialization for some reason (and badly). I don't understand why this is since my PropertyNamePersistenceInfo criteria don't seem to be met.
Can someone please try out my repro and let me know if there is an explanation? I am using IG WPF 15.1.
Thanks, David
PS. ***This persistence framework unfortunately has caused me to waste away many hours and days. There is too much of it that requires trial-and-error and virtually no examples. I think it should be IG's responsibility to manage some *commonly*used* persistence settings at a granular level (eg. one for xamGrid column visibility settings, one for xamGrid column positioning settings, one for xamGrid column filtering, etc.). Clients could then use the combination of these that they need. Do all of your clients really need to sift your entire object models trying to figure out what obscure properties need serialization in order to persist something as basic as column visibility? </Complaining>
Hello dbeavon,
Development issue 202926 is currently in an "In Review" state by our development teams. I apologize if I came across as asking the developers if they have an actual concrete answer for this. I believe that this is a bug in the persistence framework, which is why development issue 202926 was logged. When this issue gets reviewed by our development team, I will update this forum thread again.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Any news on why ContextMenu is being serialized into my XamGrid's persistence data? You had said you thought the developers might have an answer.
This is not holding me up anymore given my workaround (remove ContextMenu temporarily while serializing). But I was curious because it may give me a better understanding of your persistence framework (which is something that I didn't warm up to very quickly).
Thanks for looking at this Andrew. I really appreciate the feedback. After I posted this, I was able to find previous people on your forum that have the same issue with ContextMenu serialization. Those hits didn't give me that much more to go on. (Although I did discover the "serialization group" functionality which might be another avenue for creating some nicer work-arounds).
I don't really want my AllSavedPersistenceSettings to exclude anything. Maybe I'll create one called AllSavedNonContextMenuPersistenceSettings ;).
My current workaround is to detach the ContextMenu when I serialize the XamGrid (with Save) and then reattach afterwards. Then it doesn't show up in my serialization xml ... but it is kind of a pain....
Please let me know what they find.
Thank you for your post!
I have been investigating into the sample you sent, and I have reproduced this issue you are seeing. This is unexpected behavior, as the ContextMenu should not be getting saved when serializing and persisting the XamGrid. I have asked our engineering staff to examine this issue further, and I have logged a development issue in our internal tracking system with a development ID of 202926.
I have found a workaround to this issue with the context menu being blank after loading it, though. In your PersistenceSettings element named "AllSavedPersistenceSettings," which you are using for loading, I would recommend that you add a PropertyNamePersistenceInfo tag to the PersistenceSettings.IgnorePropertySettings. This PropertyNamePersistenceInfo element can have its PropertyName property set to "ContextMenu." This will prevent the context menu from appearing blank after loading your persistence settings.