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
1960
Existing grids' bands and columns change when adding properties to the datasource
posted

Hello,

I've been working with the UltraGrid for a while. We have many grids in our forms, binded to a "BusinessObject" (BO) class through a BindingSource instance.

The problem is every time we add a new public property or collection to the BO they pop-up in the existing grids as visible columns or bands. I have more than 20 grids, so everytime BO changes I have to manually check every grid and hide the column or the band. That's very tedious and error prone.

I can not add the Browsable(false) attribute to the new properties because I do want to be able to bind them to new grids.

Is there any workaround for this?

Thanks.

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    oscarmorasu said:
    I have more than 20 grids, so everytime BO changes I have to manually check every grid and hide the column or the band. That's very tedious and error prone.

    The best solution I can think of off the top of my head is to have a common routine somewhere that each grid calls into (perhaps from InitializeLayout), which handles the hiding of the that column. This will reduce code bloat and the likelihood of a coding error.

Children
No Data