ComboBox and Binding Context Problem

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

    #1

    ComboBox and Binding Context Problem

    I have 2 group box Buy and Sell on a form. There is an account combo box in
    both group boxes bound to same data source using DataSource, DisplayMember
    and ValueMember. Problem is binding context is causing the value in both to
    change when I change the value in one. Is there any way around this other
    than adding the list members manually?

    Thanks
  • Cor Ligthert

    #2
    Re: ComboBox and Binding Context Problem

    Job,

    Create two seperated new dataviews and bind your comboboxes too those, than
    your problem is gone.

    I hope this helps,

    Cor


    Comment

    • Job Lot

      #3
      Re: ComboBox and Binding Context Problem

      Thanks

      someone suggested me this as well

      specify a new Binding Context for your second GroupBox:

      this.groupBox2. BindingContext = new BindingContext( );



      "Cor Ligthert" wrote:
      [color=blue]
      > Job,
      >
      > Create two seperated new dataviews and bind your comboboxes too those, than
      > your problem is gone.
      >
      > I hope this helps,
      >
      > Cor
      >
      >
      >[/color]

      Comment

      Working...