I have an issue when loading the ultragrid layout from the saved XML.
Consider the following scenario:
User logs on application, navigates to a certain page, grid loads, user leaves page and the grid layout saves. Note that behind the layout of the grid, multiple columns from the underlying data source are hidden, so user does not see all the columns on the datasource.
Next time user logs on application, we have released a new change and this change happens to be an additional column in the data source and we have hidden this column in the layout of the grid mentioned above. Now when it attempts to run the LoadFromXML, it loads it but now it shows ALL the columns that are supposed to be hidden so the new layout is invalid. Is there anyway to get around this? The ideal scenario is that when running the LoadFromXML and the grid contains new column information or anything like that, it just defaults back to the original layout of the event and so when the SaveAsXml it saves the default layout back as per the initialize layout event.
I hope this makes sense.
Thank you for contacting Infragistics!
This is likely caused by the columns in your new datasource not exactly matching the columns in your previous datasource/layout. When this happens the default setting of NewColumnLoadStyle is show, you can instead set this to hide so it will hide those columns.
Also if there always a specific set of column you always want hidden you can set them hidden manually through code after that layout has been loaded.