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
805
Save and load layout is working, what about "factory reset"
posted

I'm saving the grid layouts via the XML system to the Application settings folder. I load them up just before the view is opened, which means we have our DataSources, and save them out when the user exits the app. Works great!

But I'd like a "reset to factory" feature so if they don't like what they've done they can easily return everything to an original state. I thought the easy solution to returning the grids to their original settings would be to simply delete the files out of the settings folder.

The problem is that the grids have already loaded up their settings by that point. So when they exit the app, the system saves out those settings again.

Is there a better way to do this?

Parents
  • 918
    Suggested Answer
    posted

    I delete the file as you suggest, set the grid datasource to nothing then reset the datasource.  At least in my version there is no restore default settings.  It would be easy to do if you wanted.  Just save a file with the default settings then if the user wants to restore defaults just load that file.  I use a context menu to accomplish that.

    Hope this helps

Reply Children