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
1355
Migrating saved layouts from 1 version of the tool to th new version of the tool
posted

Hi ,

   In our tool, we give option for the user to save docking layout and grid layout ( user can add,remove, hide panes..) and save as XML document and later he can reapply the profile they created.

Once we release a new version of our tool ( we may have added new grids, new cols, renamed cols....) whats the best way to migrate existing  user created layout to the new layout we created..

we want to take their settings like like hidden cols, filters, hidden panes  and migrate to our new lay out.

 

Thanks,

Valliappan

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Valliappan,

    I assume that the problem you are encountering is that you want to merge your client's saved layout with the new layout of the grid and any changes you may have made to the layout in your code.

    There's really no way the grid can determine what settings to keep and what to throw away intelligently. So you need to handle this yourself.

    There are a couple of ways to deal with this.

    You could include a version number along with your Layout files and don't load the layout if it's an older version. This makes sure that your clients don't lose any new columns or settings you add to your application, but it means that every time you release a new version, they lose their customizations.

    You could make any changes you need to make in code after the layout is loaded. This way your client gets all of their loaded settings and then you make sure that any new stuff you need is added on top of that. The down side of this is that it could make it hard to customize the new content, since your code will be blowing away any customizations after the layout is loaded.

    You could use a combination approach where you store a version number and then only run certain code the first time a layout is loaded that is not the same version as the application. This gives you the best of both worlds.

    Still another option would be to try to merge the layout yourself. What you could do is load the Layout from a file into an UltraGridLayout variable instead of directly into the DisplayLayout of the grid. Then you could examine the DisplayLayout of the grid and see if there are new columns in the grid that do not exist in the loaded layout. You could store these in a list. Then load the layout into the grid, and then add the new columns (which the loaded layout removed) back into the DisplayLayout.

Children
No Data