sincronizing two combo boxes

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

    sincronizing two combo boxes

    Hi people,

    Excuse if my question is silly, but...

    i have 2 combo boxes in my project
    they are binded to fields from same table...
    one is binded do Code field and another to Description field

    i want to sincronize both...

    if i change Code combo, the Description combo shows text of description on
    it
    and if a change description combo scrolling, the other combo (Cod combo)
    show the code associated...

    any clues?

    thanks


  • sloan

    #2
    Re: sincronizing two combo boxes


    I am going to assume a winforms application, since you posted in this
    newsgroup (not asp.net) and you don't specify winforms or asp.net.

    ...


    and/or


    Keywords
    Binding
    DataBindings.Ad d
    BindingContext



    "User" <a@b.comwrote in message
    news:eUg0ENt1IH A.4936@TK2MSFTN GP05.phx.gbl...
    Hi people,
    >
    Excuse if my question is silly, but...
    >
    i have 2 combo boxes in my project
    they are binded to fields from same table...
    one is binded do Code field and another to Description field
    >
    i want to sincronize both...
    >
    if i change Code combo, the Description combo shows text of description on
    it
    and if a change description combo scrolling, the other combo (Cod combo)
    show the code associated...
    >
    any clues?
    >
    thanks
    >

    Comment

    • Ignacio Machin ( .NET/ C# MVP )

      #3
      Re: sincronizing two combo boxes

      On Jun 25, 10:53 am, "User" <a...@b.comwrot e:
      Hi people,
      >
      Excuse if my question is silly, but...
      >
      i have 2 combo boxes in my project
      they are binded to fields from same table...
      one is binded do Code field and another to Description field
      >
      i want to sincronize both...
      >
      if i change Code combo, the Description combo shows text of description on
      it
      and if a change description combo scrolling, the other combo (Cod combo)
      show the code associated...
      >
      any clues?
      >
      thanks
      Hi,

      You can ue the SelectedValueCh anged on each combo and update the
      other.
      You have to be carefull though of not entering in an infinite loop

      Comment

      • User

        #4
        Re: sincronizing two combo boxes

        you are right, is winforms...

        Thanks a lot....
        I am going to assume a winforms application, since you posted in this
        newsgroup (not asp.net) and you don't specify winforms or asp.net.
        >
        ..
        >

        and/or

        >
        Keywords
        Binding
        DataBindings.Ad d
        BindingContext
        >
        >
        >
        "User" <a@b.comwrote in message
        news:eUg0ENt1IH A.4936@TK2MSFTN GP05.phx.gbl...
        >Hi people,
        >>
        >Excuse if my question is silly, but...
        >>
        >i have 2 combo boxes in my project
        >they are binded to fields from same table...
        >one is binded do Code field and another to Description field
        >>
        >i want to sincronize both...
        >>
        >if i change Code combo, the Description combo shows text of description
        >on it
        >and if a change description combo scrolling, the other combo (Cod combo)
        >show the code associated...
        >>
        >any clues?
        >>
        >thanks
        >>
        >
        >

        Comment

        • User

          #5
          Re: sincronizing two combo boxes

          thanks ...


          Hi,

          You can ue the SelectedValueCh anged on each combo and update the
          other.
          You have to be carefull though of not entering in an infinite loop


          Comment

          Working...