Tab Control with Combo Box

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I have a windows form that contains a tab control. On
one of the tabs I have a combo box bound to a datatable.
When I first enter the tab I initialize the selectedindex
of the combobox to -1. I then type text into the combo
box that does not match any entries in the dropdown
list. If I then choose a different tab and return to my
tab with the combo box, the selectedindex has been
changed to 0 and the text I entered is replaced with the
text from list item 0. Why does the combo box not retain
a selectedindex of -1 with the text I entered? How can I
correct this?

Thank You,
Don
 
Hello,

Don said:
I have a windows form that contains a tab control. On
one of the tabs I have a combo box bound to a datatable.
When I first enter the tab I initialize the selectedindex
of the combobox to -1. I then type text into the combo
box that does not match any entries in the dropdown
list. If I then choose a different tab and return to my
tab with the combo box, the selectedindex has been
changed to 0 and the text I entered is replaced with the
text from list item 0. Why does the combo box not retain
a selectedindex of -1 with the text I entered? How can I
correct this?

I have already heard about that bug (you are not the only one who
experiences it). I feel sorry, but I don't know a "fix".
 
Back
Top