Search code examples
c#winformstextboxbindingsource

What determines the order in which data bound text boxes are filled in a form?


I have a form with three text boxes, of which the first and second are bound to the same data binding source. When the form loads, I need the first text box to populate so that the second can use it's data to find it's description and fill the third text box. However, my second text box fills before my first, meaning when the _TextChanged function is called, the first text box's value is an empty string, useless for the third textbox.

What determines the order in which data bound text boxes are filled and how can I change this order so that my first textbox has data when my second text box's _TextChanged function is called?


Solution

  • In the designer view of the form, you can select View -> Other Windows -> Document Outline.

    This window allows you to move the order of controls in the form.