I am using DevExpress grids, there are way to save layout, but I have additional question: Is there possible to update already saved layout, without overwriting it, but only updating, for example columns, which were changed?
3 Answers
I can't understand what is the purpose of updating saved layout.
However when you call savelayout after changing columns, it will completely write current layout related information (columns display status, columns view order, sorting information etc.,) to the registry/stream/XML and no possibility for just updating existing layout information.
If you previously applied layout from already saved file, then overwriting the same file (with layout information) will be equivalent to your requirement - updating saved layout.

- 266
- 2
- 7
Can I suggest you create a copy of this layout file? That way you can update the copy and still have the original.

- 949
- 8
- 21
This question is asked a long time ago, but there is an possibility to upgrade existing layout files in DevExpress. You have to handle two events: LayoutUpgrade and BeforeLoadLayout. At the beginning you have to give your layout an version number with the property OptionsLayout.LayoutVersion. When you change your layout, hide some columns, add new columns, add new filters... change the LayoutVersion number. When your application starts, DevExpress compare the existing LayoutVersion number with the new one, if there is a difference LayoutUpgrade event is firing.
DevExpress describe this behaviour here: Ugrading Layout
I hope this will help.

- 629
- 6
- 18