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
545
Grid is losing settings/properties
posted

In my application, most of my grids are wired up to a typed dataset.

On various occasions many of the grids lose their settings - headers are reset, hidden columns no longer hidden, combo boxes no longer embedded, cell color settings, etc.  I can't really nail down any consistent trigger but it appears to happen more often after making a change to the underlying dataset - adding a column, etc. 

This is causing me quite a bit of work to go back and reset everthing back to the way I like/remember and makes me nervous about continuing to use the UltraGrids in this manner.

Anybody else experiencing similar problems?  Is there a way I can "lock" a grids setting? 

Thanks

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    This KB article might help.

    HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?

    The grid will lose it's layout if you bind it to a DataSource that doesn't match the current layout. And keep in mind that if your grid is bound at Design-time, then essentially every time you open the form designer, the grid is getting re-bound to the data source.

    What version of the grid are you using? We've made some improvements over the years to make this work better and be more stable, so upgrading to the latest version of the grid or even the latest service release for the version you have might help. 

    You could also save the grid's Layout to a file using the Layout wizard and keep it as a backup.Then if something gets lost, you just re-load the layout.

    Personally, I find the visual Studio design environment a little bit unpredictable, so I like to use the InitializeLayout even to the grid to set up my layout in code. That way it never gets lost. The down side, of course, is that there are some things that are very hard to do in code and really require a visual designer, like setting up RowLayouts, for example.

Children