databinding for multiple comboboxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    databinding for multiple comboboxes

    I have a 4 tab form each with different dataviews attached to a datagrid. On
    the last tab, I have a dataview attached to a datagrid and 2 comboxes that
    are bound to the same dataset representing 2 different columns in the dv.
    When I create cbSecond.Bindin gContext = new BindingContext( ); the combox
    loads okay but the value does not change with the new row, nor do changes in
    the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
    cbfirst.binding Context = new BindingContext( );). Instead I get a a form that
    freezes when a new selection is made from the dropdown list in cb2. When the
    first combobox value is changed, the second combox clears the textbox. I
    have regnerated the dataset, the dataviews and deleted and reapplied the
    datagrid numerous times. What is wrong with it?
  • Kevin

    #2
    RE: databinding for multiple comboboxes

    I have narrowed some of the problem down. When I moved the 2nd combox off of
    the tab pain onto the parent form, everything works. So that leads to
    believe that the tabcontol binding manager is the problem. So how do I fix
    this? I already tried to create seperate binding contexts for each tabpage,
    but that didn't appear to change anything.

    "Kevin" wrote:
    [color=blue]
    > I have a 4 tab form each with different dataviews attached to a datagrid. On
    > the last tab, I have a dataview attached to a datagrid and 2 comboxes that
    > are bound to the same dataset representing 2 different columns in the dv.
    > When I create cbSecond.Bindin gContext = new BindingContext( ); the combox
    > loads okay but the value does not change with the new row, nor do changes in
    > the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
    > cbfirst.binding Context = new BindingContext( );). Instead I get a a form that
    > freezes when a new selection is made from the dropdown list in cb2. When the
    > first combobox value is changed, the second combox clears the textbox. I
    > have regnerated the dataset, the dataviews and deleted and reapplied the
    > datagrid numerous times. What is wrong with it?[/color]

    Comment

    Working...