Calvin Cutts

Calvin Cutts

  • NA
  • 49
  • 2k

Two way data binding for controls

Dec 10 2019 7:46 AM
Hi, I have a textbox and a listbox (on separate forms), I've set the datasource of the listbox to be a class that contain a bindinglist<string> which is populated by the textbox, making it so I can type in the textbox and populate the listbox.
What I'd like to also do is make a binding in the other direction at the same time, I want to click on an item in the listbox and have that text be shown in the textbox, thereby having a two way bind between the controls.
 
Could someone tell me how that is done please?
Thanks 
 

Answers (4)