C
chris in grimsby
I have a combobox of dropdownlist style as one of the controls on a
tabbed form.
The list is populated by setting the DataSource property to a dataset
and then the DisplayMember and ValueMember properties are set to the
names of 2 of the fields in the dataset.
I noticed that when the form displays, the combobox defaults to the
first item in the list, not to blank (selectedindex=-1) as I would
have expected. I can use the Form_Activated event to set the
selectedindex=-1 and that is ok, until a different tab is selected
followed by this tab. Now the selectedindex=0 again and the combobox
shows the first item in the list again, even though the index change
event didnt fire.
tabbed form.
The list is populated by setting the DataSource property to a dataset
and then the DisplayMember and ValueMember properties are set to the
names of 2 of the fields in the dataset.
I noticed that when the form displays, the combobox defaults to the
first item in the list, not to blank (selectedindex=-1) as I would
have expected. I can use the Form_Activated event to set the
selectedindex=-1 and that is ok, until a different tab is selected
followed by this tab. Now the selectedindex=0 again and the combobox
shows the first item in the list again, even though the index change
event didnt fire.