I have a winform with a combobox. This combobox's text is set to a value from the database (in this case, a number). In my code I take the number and convert it to the proper text, returning the value as the selecteditem for the combobox. This part works.
However, if I try to UPDATE the value in the combobox at runtime, I am able to select the new value, but after that I cannot do anything. I am unable to select any other element on my form (textboxes, comboboxes, etc). The program basically hangs and I have to exit. The new value in the problem combobox stays highlighted though, and kind of "sticks" there.
Any ideas are welcome.
Code is below.
However, if I try to UPDATE the value in the combobox at runtime, I am able to select the new value, but after that I cannot do anything. I am unable to select any other element on my form (textboxes, comboboxes, etc). The program basically hangs and I have to exit. The new value in the problem combobox stays highlighted though, and kind of "sticks" there.
Any ideas are welcome.
Code is below.
Code:
int PATesting = Convert.ToInt32(comboBox73.Text); string TestStatus = " "; switch (PATesting) { case 0: TestStatus = "Assigned"; break; case 1: TestStatus = "Working"; break; case 2: TestStatus = "Code Submitted"; break; case 3: TestStatus = "In Testing"; break; case 4: TestStatus = "Passed"; break; case 5: TestStatus = "Failed"; break; case 6: TestStatus = "Hold"; break; case 7: TestStatus = "In Production"; break; } this.comboBox73.SelectedItem = TestStatus;
Comment