Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing combo box event

Status
Not open for further replies.

Crisps

Programmer
Sep 28, 2006
26
0
0
US
I have an event handler that is called whenever I change the value of a DropDownList style of combo box;

This occurs perfectly when I change it with the mouse or when I change it programatically (on file open in this case)

My problem is that when I want to clear the value of the combo box and use that event to clear all the lists associated with it the event is not called. (e.g. on file new)

i.e. "MyCombo.SelectedIndex = -1;" doesn't cause the "MyCombo_SelectedIndexChanged" event to be fired.

Am I doing something wrong or is this a mistake in the C# API? Changing the Selected index to ANYTHING should cause this event, otherwise they should rename the event to "SelectedIndexChangedToPositive"

Is there a workaround for this?

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top