Hi there , i have (for example) the following grid
header->test1,test2,test3,test4now i want that the user can (maybe in an other config form) choose the order of the header (grid) or say that he don't want to display column test3
user config grid
test4,test1,test2
this i want save and if the user wanna see again the grid it should build up like the configuration.
Hi Martin,
You can allow the user to move or hide columns in the grid very easily. Set AllowColMoving (on the Override) for column moving. And you can use the ColumnChooser to let them hide columns (see the RowSelectorHeaderStyle property on the override for the easiest way to do this).
Saving and loading the layout is also pretty easy. Just use the grid.DisplayLayout's Save and Load methods (or SaveAsXml and LoadFromXml).
Hi Mike,
as far as I know the DisplayLayout.SaveAsXml method will not include the visibility of columns. If I for instance will take the ColumnChooser, enable 2 more columns there and the use SaveAsXml, this setting will not be restored the next time. Is that right?
Thanks, Alex.
Hi Alex,
Saving and loading the layout should absolutely save the visiblity of the columns. If it's not doing so, something is wrong.