ComboBox SelectedIndex is set to 0

A

Albert

Hello guys,
I have a TabControl in a Windows Form. In one of the tabs I have a DataGrid
with Items, and in another one some controls that let the user add a new
item. In this second tab there's a ComboBox for selecting the type of the
item. When the user select one item in the ComboBox some other controls get
the values based on the selected item.
The problem is that when the user change from one tab to the other the
SelectedIndexChanged event of the ComboBox fires and the SelectedIndex has a
value of 0.
Any help is appreciated,
Thanx, Albert
 
H

Herfried K. Wagner [MVP]

Hello,

Albert said:
The problem is that when the user change from one tab
to the other the SelectedIndexChanged event of the ComboBox
fires and the SelectedIndex has a value of 0.

That's a known problem with databound comboboxes on tabpages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top