
01-08-2009, 8:19 PM
|
 |
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
|
|
Join Date: Aug 2004
Location: Sydney, Australia
Age: 40
Posts: 6,131
Reputation: 542
|
|
The SelectedIndexChanged event is raised every time the SelectedIndex property value changes. If your ComboBox is initially empty then its SelectedIndex is -1. When you bind data to it the first item is selected by default and the SelectedIndex changes to 0. You are then explicitly setting the SelectedIndex to -1 again.
If you're only interested in knowing when the user makes a selection then handle the SelectionChangeCommitted event instead.
|