Greg Robinson's Blog

I report it, you decide

Click Once

Custom Authentication in Windows Forms

DataBinding Stuff

Favorite Links

My book contribution

My Book Reviews

My Personal Life

Richmond, VA .NET Users Group

Smart Client Stuff

What I am reading

SelectionChangeCommitted event does not always fire

In development, using V 1,1 of the framework, we have seen cases where Combobox.SelectionChangedCommitted does not fire.  Ever trying numerous work arounds, I finally asked MS.  Here is their reply:

" It sounds like using Alt DownArrow to pull down and up the droplist -- which currently (and in 1.1) does not fire selectionchangecommitted. And yes, there are many places where the SelectionChangeCommitted event isn't fired even though the value has changed. SelectionChangeCommitted only fires when the user hits enter or clicks on the item. It should have the exact behavior as in everett.  We were going to change this event, but not only would it be a breaking change, but the meaning of selectionchangecommitted would be blurred with selectedindexchanged.  If you think of how IE works, you can Alt-Down to select another web site, and then Alt-Down again and IE does NOT navigate to the site. However, if you hit enter or click on the item, IE will navigate."

Comments

Slarti said:

it v2.0 now and the combobox is still crap.  the "SelectionChangedCommitted" fires, but (in a combobox with binding to 'selectedvalue') when it fires, the 'selectedValue' has not changed yet!!!  So the "selection change is committed", but, the selectedValue still shows the old value!  WTF billy-buddy?

# February 16, 2007 1:37 PM

MD said:

I came across this too. The only workaround I've managed to come up with is to make a boolean flag, set the flag in SelectionChangeCommitted, and then check the flag and conditionally do work in SelectedIndexChanged. Unfortunately, once MS has released something broken they're very reluctant to fix it for fear of breaking third-party software that relies on the bugs.

# March 1, 2007 7:30 PM

BT said:

The problem I am having is with a ComboBox.  For example, it contains the names of the States.  I type the letter 'o' in the edit portion of the box and then I click the widget to open the drop down.  Ohio is highlighted and now appears in the text box.  I think, 'great, that is what I want' and I click the widget to close the drop down.  At this point the SelectedValue has changed but neither the SelectedIndexChanged or SelectionChangeCommitted events have fired.  I need to detect that the value has changed to modify the appearance of the form.

Any suggetions?

# August 8, 2007 5:32 PM

SelectionChangeCommited event on Combobox not triggered » Depechie’s outing said:

Pingback from  SelectionChangeCommited event on Combobox not triggered » Depechie’s outing

# September 18, 2008 5:26 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)