Combobox selectedindex not changing item
Posted on 2014-01-23
I have two forms, form1 and form2.
form1 has a combobox, items filled on form load from a linq to Sql Class. The combobox has a databinding to a text field in a table.
A button on form1 opens form2 (form1 is passed byref to form2).
in form2 the user enters new data which goes to the linq to Sql table, and the combobox items on form1 are cleared and repopulated so adding the new item to the combobox list.
So far so good.
Changing the selectedindex of the combobox on form1 does not change the value shown in the combobox.
Changing the text in the combobox does not change the value shown in the combobox.
I have established that the selectedindex value I am using is correct.
What is the correct way to get the value in the combobox to change to the new value?
Thanks to any responders.