Is there anything that might prevent the SaveAsXml method from saving the band and column settings?
I'm calling the method at a point after InitializeLayout has run. For some grids, the SaveAsXml method saves all of the column data (position, size, etc). For some others, the exported XML file doesn't contain references to the BandsCollection, ColumnsCollection, or SortedColumnsCollection.
For the problem grid, the DataSource is bound at design time and the grid displays everything correctly when run. I tried both SaveAsXml(character) and SaveAsXml(character,PropertyCategories.All). In both cases, one grid I'm testing exports correctly, the other doesn't.
I checked at the point I'm calling the export and the grid has a bands collection (1 band) and the band has 17 columns. I've attached the two XML files. Any help would be greatly appreciated.
Regards,
Jim
Hi Mike,
thanks for the sample project. I finally found the reason for the behaviour.
I use DataBinding with a BindingList. Then on the UltraGridColumn, the GroupByMode was not set (therefore set to Default). This worked fine if I load the grid with the data and manipulate it, e.g. do grouping. But when call SaveAsXml and LoadAsXml (and no GroupByMode set), then the grouping does not work correctly anymore after LoadAsXml was called. It may have do to something with the bound object types tough.
If I set the GroupByMode to Text, then it always works, so I am going to use that.
Regards,Reto
Hi Reto,
I just tested this out and it's working fine for me. I am attaching the sample project I used here so you can try it out.
Just run the sample, drag any column into the GroupByBox, then press the buttons in order from top top bottom to save, reset, and then re-load the layout.
I have installed the latest service release and it does not fix it. E.g. my version is:Infragistics2.Win.UltraWinGrid.v9.1\9.1.20091.2039
If I have a grid, then group by a column and do a SaveAsXML and immediately reload the output using LoadAsXML, the grouping is destroyed.
Can you please have a look at this?
My Infragistics Keys and Downloads - Download Anything and Everything You Own
where can I get information about the latest service release?
Reto