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
4032
How bind Band[1] to BindingSource
posted

I have a multiband grid and bound the grid.DataSource to a bindingSource. The grid rows are displayed in correct hierachical form.

My grid would display band[0] to band[3]. For layout reasons I like band[2] and band[3] data display in other controls on my form. For every band (=dataTable)  I have a bindingSource with dependencies over foreign key relation in my dataSet and I use this for the bindingSource.DataMember. Everything like it should be, I guess.

But if I select grid child rows in band[1] my dependent data are not displayed corresponding to the grid row.

Do I need assign the bindingSource assign to the grids band[1]? I looked for a property such like grid.displayLayout.Bands[1].dataSource but this is not possible.

Thanks for any help.

Markus

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Markus,

    The DotNet BindingManager will handle this for you automatically, as long as the controls are bound property to the correct data sources and as long as all of the controls have the same BindingContext.

    By default, the controls get their BindingContext based on their containing control. So if all of the controls are in the same container, then you probably just have to mess around with the bindings a little. I don't think we have any documentation on this, since it's really nothing to do with our controls, specifically, but Microsoft must document this somewhere.

Children