Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Reset() method on WinGrid
posted

Hi

I'm writing a save layout method that allows user to create their own layouts and just in case they mess up I have used the Reset() method on the DisplayLayout. But...I have used a column chooser and when the layout is reset the column chooser button vanishes.

Any idea why this happens and what can I do to fix it? Is there another Reset() method I should use. Currently I have had to use a default layout xml file to reset the layout to the defualt one, but this is just a bit of overhead I'd rather do without.

Thanks

Jeff

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Jeff,

    The Reset method will return the grid to it's default settings. These are the default settings of all properties in the grid. The grid does not record the settings that you set up at design-time, including any presets that may get loaded - and a preset is loaded into the designer by default.

    So if you want to establish a set of default grid settings for your application, you really need to save them yourself into a stream of a file or a layout.

    I recommend saving the layout into the grid.DisplayLayout.Layouts collection. It's a convenient place to store a layout at design-time without having to write to a file.

Reply Children
No Data