We have problems adding a new column in a XamGrid while using a persisted configuration. We us the PersistanceManager.Save with some settings to save the configuration (in my example in a file but in reality we store the configurations in a database). Now a costumer wants a new column while not loosing his configurations. So we tried to add a column in Xaml but unfortunately the configuration will overwrite the configuration from the xaml-file.
I have attached a sample solution. A "standard" configuration is already saved. And in the xaml I have added a new Column "Wedding" which is not shown...
How can I solve this?
Hi,
I'm not really sure whether this is possible in the way you do it. I would suggest playing a bit with the settings of the saved configuration that you are actually trying to load.
Regards,
Stefana
Hi Stefana,
thank you for your suggestion but this is nearly impossible to implement for every XamGrid in a large application. We want more like a alogrithm which saves the original ColumnLayout and than makes a delta to a loaded Config.
Is there a way of doing this?
Regards
Hi Karl,
I would suggest the following changes:
1. Set XamGrid.AutoGenerateColumns to False.
2. Remove the 'Wedding' DateColumn from XAML.
3. Add the 'Wedding' DateColumn from code behind after loading the configuration
I have attached a modified version of your sample so that you can check if those changes will work for you. If you have more questions or these steps do not solve your problem, please let me know.