Hi!
I have ListBox data bind to list of users (collection):
usersListBox.DataSource = null;
usersListBox.DataSource = _users;
usersListBox.DisplayMember = "Name";
usersListBox.ValueMember = "Id";
Now I want properties of selected item to be shown in different text boxes, so I do the binding:
nameTextBox.DataBindings.Add("Text", usersListBox.SelectedItem, "Name");
loginTextBox.DataBindings.Add("Text", usersListBox.SelectedItem, "Login");
When form load I can see that values of selected item appear in textboxes, but when selected item in listBox is changed, values in text boxes are still the same. Do I have to catch selectedItemChanged of listbox and repeat binding of textboxes? Or I'm missing something and values in textboxes should change with changing selected item?