C# Programming
02-05-2010, 11:23 PM
Hi people,
I have 2 combos on my winform. Both are bound to the UserTable (which stores the user info..like usernames and personal info).
The combos display the usernames. But the problem is when I select one username in one of the combos, the other combobox populates the same value, and I dont want this
to happen. I know it is because they are bound to the same table. How do I make them independent?
comboBox_RequestingUser.DataSource = UserTable;
comboBox_RequestingUser.DisplayMember = "UserName"
comboBox_RequestingUser.ValueMember = "User_ID"
comboBox_AssigningUser.DataSource = UserTable;
comboBox_AssigningUser.DisplayMember = "UserName"
comboBox_AssigningUser.ValueMember = "User_ID"
I hope this makes sense.
thanks,
I have 2 combos on my winform. Both are bound to the UserTable (which stores the user info..like usernames and personal info).
The combos display the usernames. But the problem is when I select one username in one of the combos, the other combobox populates the same value, and I dont want this
to happen. I know it is because they are bound to the same table. How do I make them independent?
comboBox_RequestingUser.DataSource = UserTable;
comboBox_RequestingUser.DisplayMember = "UserName"
comboBox_RequestingUser.ValueMember = "User_ID"
comboBox_AssigningUser.DataSource = UserTable;
comboBox_AssigningUser.DisplayMember = "UserName"
comboBox_AssigningUser.ValueMember = "User_ID"
I hope this makes sense.
thanks,