Friday, June 16, 2006
« RegEx AND code is good | Main | Intro to technologies related to web ser... »
I learned something new today: when handling a user-initiated event from a combo box (when a user selects an item), most of the time you want to handle the SelectionChangeCommitted event, not the SelectedIndexChanged or SelectedValueChanged events - the latter two events may also fire when the combo box is changed through code.  From MSDN:
SelectionChangeCommitted is raised only when the user changes the combo box selection. Do not use SelectedIndexChanged or SelectedValueChanged to capture user changes, because those events are also raised when the selection changes programmatically.
The event order is [ChangeCommitted] >> [ValueChanged] >> [IndexChanged]



Friday, June 16, 2006 9:15:24 PM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [3]  |  Related posts:
Tracked by:
"http://9lr-free-porn.info/63690192/index.html" (http://9lr-free-porn.info/63690... [Pingback]
"http://9lr-free-porn.info/42441865/index.html" (http://9lr-free-porn.info/42441... [Pingback]
"http://9ls-free-porn.info/46249707/index.html" (http://9ls-free-porn.info/46249... [Pingback]
"http://9lt-free-porn.info/12543762/index.html" (http://9lt-free-porn.info/12543... [Pingback]
"http://9lq-free-porn.info/90002648/index.html" (http://9lq-free-porn.info/90002... [Pingback]
"http://9lr-free-porn.info/35609960/the-d-pickle-co-toronto.html" (http://9lr-fr... [Pingback]
"http://9ln-free-porn.info/42846412/index.html" (http://9ln-free-porn.info/42846... [Pingback]
"http://9ll-free-porn.info/04708679/essex-regiment-way-golf-course-uk.html" (htt... [Pingback]
"http://9lq-free-porn.info/90953574/index.html" (http://9lq-free-porn.info/90953... [Pingback]
"http://9lk-free-porn.info/36299365/index.html" (http://9lk-free-porn.info/36299... [Pingback]
"http://9lk-free-porn.info/29669628/index.html" (http://9lk-free-porn.info/29669... [Pingback]
"http://9lk-free-porn.info/24753409/index.html" (http://9lk-free-porn.info/24753... [Pingback]
"http://9lq-free-porn.info/52096346/index.html" (http://9lq-free-porn.info/52096... [Pingback]
"http://9lr-free-porn.info/54449020/index.html" (http://9lr-free-porn.info/54449... [Pingback]
"http://9lo-free-porn.info/76128031/index.html" (http://9lo-free-porn.info/76128... [Pingback]
"http://9lr-free-porn.info/74365020/victoria-principal-blowjob-video.html" (http... [Pingback]
"http://9lo-free-porn.info/41273400/index.html" (http://9lo-free-porn.info/41273... [Pingback]
"http://9nq-information.info/93984124/getting-married-in-city-hall-new-york-city... [Pingback]
"http://9nj-information.info/77479900/dinkelsbuehl-city-map.html" (http://9nj-in... [Pingback]
"http://9nn-information.info/60298402/index.html" (http://9nn-information.info/6... [Pingback]
"http://9ne-information.info/51330072/real-estate-sales-ma.html" (http://9ne-inf... [Pingback]
"http://9nm-information.info/36444615/1140-phone-user-guides.html" (http://9nm-i... [Pingback]
"http://9nh-information.info/54724631/index.html" (http://9nh-information.info/5... [Pingback]
"http://9ma-free-porn.info/17365761/index.html" (http://9ma-free-porn.info/17365... [Pingback]

Thursday, September 21, 2006 5:32:56 PM (Central Daylight Time, UTC-05:00)
Just wanted to let you know that Kaelin and I found this post quite helpful today. I had always used either SelectedValueChanged or SelectedItemChanged and I didn't know about this one. Nice!
Monday, October 29, 2007 8:09:09 AM (Central Daylight Time, UTC-05:00)
very very useful
thanks
nanthakumar
Thursday, February 07, 2008 3:53:24 PM (Central Standard Time, UTC-06:00)
I have always considered this to be Microsofts biggest flaw with the winforms controls. Why on earth did the .Net UI gurus design all the common controls to fire events when they change programatically? My thoughts are that I know I'm changing the property, I only need to know when the property changes due to user interaction. This tends to occur when you are following good application design and you are separating the state from the UI. This is a major annoyance when trying to implement a Model-View-Controller design pattern.
Well, that's the end of my rant. Thanks for letting me vent some frustration.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u)  

Enter the code shown (prevents robots):