Hi,
I need our WinGrid to save and Load its settings. For example, when the its parent form closes, the grid should save its settings to whatever value it has to an xml/binary file.
It's not clear what you mean by "settings". If you want to save user-customizable options like the positions and width of the columns or the sorting and filtering, then you can use the grid.DisplayLayout.Save/Load methods.
Yes, I meant user-customizable settings. For example, the user may hide/unhide GroupBy.. or other things.
Any column-, band-, or layout-level property that the user can modifycan be saved using the Load/Save methods on the grid's DisplayLayout. This canot include any row- or cell-level properties, though, since those are tied to the actual data.
Hi Mike,
Can you tell me how to save the column settings using load/save methods. Can you give me one example. My requirement is to store the column width changes in an XML.
Regards,
Pradeep
Hi Pradeep,
I'm not sure what you are looking for. I'm sure there are samples in the WinGrid samples explorer that use the Save and Load methods on the layout. There's really nothing to it, it's just a single method that takes a file name and an enum indicating which parts of the layout to save/load.