I have a scenerio where I use a xamdatagrid to display data and when the datagrid is loaded or application exits it will save/load customization. I noticed however when I make a change to the datagrid's summary definition that grid ignores my changes and uses what is ever in the load customization settings. Is there a built in function I can use to update that? Also when load customization occurs does it do a compare on the fields to see if any have been added or removed?
Hello,
Thank you for your post. I have been looking into it, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Attached is a demo. In this demo I have a text file where the datagrid reads the XML and stores the customization settings. What happens is if I change the SummaryDefinitions Calculator or SourceFieldName property the datagrid ignores my changes and reads whats in the txt file. I want to know is there a way for the datagrid to compare what's in the file with any changes I may have made in the XAML.
I have been looking into your sample and I can say that there is no built-in functionality for checking whether a setting from the saved layout differs from the current settings of the XamDataGrid. I can suggest you create a XML document from the saved file and read it in order to find what are the differences in the settings and decide whether to apply new ones or not. I modified the sample you have sent in order to show you how to create the XML file based on the saved file.
Hope this helps you.