Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1140
Another Ultra Combo error?...
posted

I'm using an UltraCombo in the DropDown style and using AutoCompleteMode set to SuggestAppend.  In my code I'm using the SelectionChangeCommitted event.  Everything works like I expect, EXCEPT in the following scenarios...

Lets say I have a few Items such as Cabin1, Cabin2, Home1, Home2, Home3, Office1, and Office2 in the DropDown list. 

If I select Home1, then using the Backspace key I remove the "1" leaving just "Home", the UltraCombo will nicely show me a small DropDown with the three Home(X) options.  If I use my up or down arrow keys and highlight Home2 and then hit the Tab key, the UltraCombo will set the Text\Value to Home2 and my cursor will leave the UltraCombo box and the SelectionChangeCommitted NEVER fires. 

Alternatively, instead of using the up and down arrow keys, once the DropDown with the three Home(X) options appears, I can Click on Home2 with my Mouse and, again, the UltraCombo will set the Text\Value to Home2, my cursor STAYS in the UltraCombo box and the SelectionChangeCommitted NEVER fires.

I believe both those cases (which I'm sure are due to the same root cause) are errors.  The SelectionChangeCommitted event SHOULD fire because the user has in fact changed the selection.

 This problem is in both version 2008 Vol3 and 2009 Vol1.

 

By the way, I NEVER get email notification of replies to my posts on this forum, even tho the "Email me replies to this post." is checked, the settings in my profile for allowing email notifications are checked, and my email address is in my profile...   Somethin' not quite workin' right there...

 

Parents
  • 69832
    Offline posted

    The Infragistics.Win.UltraWinGrid.UltraCombo control does not expose a SelectionChangeCommitted event, so I am assuming here that you are actually referring to the Infragistics.Win.UltraWinEditors.UltraComboEditor control.

    Wolven said:
    If I select Home1, then using the Backspace key I remove the "1" leaving just "Home", the UltraCombo will nicely show me a small DropDown with the three Home(X) options.  If I use my up or down arrow keys and highlight Home2 and then hit the Tab key, the UltraCombo will set the Text\Value to Home2 and my cursor will leave the UltraCombo box and the SelectionChangeCommitted NEVER fires. 

    I checked to see what the intrinsic ComboBox does in this scenario (which we emulate when it is possible and reasonable to do so), and it behaves identically. I believe the logic there is that the user did not specifically click on the item or press the enter key, so the selection change was not "committed".

    Wolven said:
    Alternatively, instead of using the up and down arrow keys, once the DropDown with the three Home(X) options appears, I can Click on Home2 with my Mouse and, again, the UltraCombo will set the Text\Value to Home2, my cursor STAYS in the UltraCombo box and the SelectionChangeCommitted NEVER fires.

    This should in fact cause SelectionChangeCommitted to fire; I was not able to reproduce your claim that it doesn't, using the latest 2009.1 build. It would seem possible that a recent bug fix might have addressed this issue.

  • 1140
    Offline posted in reply to Brian Fallon

    Yes, I meant the UltraComboEditor...  

    I have a sarcastic wit and a biting sense of humor, so picture the comments below being said with a grin...

    My mommy taught me at a young age that just because little Johnny next door craps on his porch isn't going to be accepted as a valid reason for emulating his behaviour...    Likewise, just because the MS ComboBox doesn't work correctly (or logically) doesn't mean IG should emulate their stupidity.  Is that some sort of Marketing\Selling point?  "Hey, Our controls are just as F@#$^ up as Microsofts!"  Wow...  how cool is that?  "Yeah, and when they fix theirs, then We'll fix ours!"  Logic like that could almost make someone wonder why they aren't just using the "free" MS controls that came with their IDE...

    The entire purpose of the SelectionChangeCommitted event is to notify the program(mer) that the user changed the text in the control.  The fact that under certain circumstances it FAILS to fire when the user DID IN FACT change the text (selection) IS NOT A Feature!  It's a bug.  And whether the user clidked the mouse, the enter key, or the tab key doesn't matter.  The question is, DID THEY CHANGE THE SELECTION?  And in the scenarios I described, the answer is, YES, the user changed the selection.  Just because the MS ComboBox has the same bug is irrelevant, and a worthless, unacceptable excuse. 

     As for the second scenario you quoted, I didn't describe it quite right.  I backspace to change Home1 to Home, then when the dropdown with the  three Home(X) options appears, I use the arrow key to go down and highlight Home2, THEN I grab the mouse and click on the already highlighted Home2.  At that point, the dropdown closes up, the value in the combobox is Home2 (IT WAS CHANGED!) and the event doesn't fire.

     All of the scenarios I described in my note on the case function EXACTLY the same with the sample application you built.  I added MessageBox.Show(IG SelectionChanged) and MessageBox.Show(MS SelectionChanged) lines to your sample program.  I'm sure they're redundant, but being somewhat new to VS, I didn't understand how to use your Debug line.  Anyway, your sample app has the exact same behaviour (BUGS) as my app.  

    I notice the case status is "Closed".  I think that's completely wrong.  The problem still remains.  And again, arguing that the MS combobox has the same problem is meaningless.  Please, reopen the case and FIX the damn problems.

    Thanx

  • 69832
    Offline posted in reply to Randy Agnew

    Wolven said:
    The entire purpose of the SelectionChangeCommitted event is to notify the program(mer) that the user changed the text in the control.

    The control exposes a TextChanged event for that purpose. According to MSDN documentation for the
    SelectionChangeCommitted event, it "Occurs when the selected item has changed and that change is committed." They are a bit vague in their documentation about what constitutes a  "committment" of the change, so we elected to emulate the ComboBox behavior in that regard. It seems for the most part, committing a selection change means to (a) click on the item when the dropdown is open, or (b) press the enter key after navigating to an item. Some might consider the act of tabbing out of the control before clicking an item or pressing the enter key as not committing it, but rather abandoning the operation altogether, similar to pressing the escape key. The tab key's purpose in this scenario is to navigate out of the control, and it doesn't have any specific significance with regard to selection.

    Wolven said:
    The fact that under certain circumstances it FAILS to fire when the user DID IN FACT change the text (selection) IS NOT A Feature!  It's a bug.  And whether the user clidked the mouse, the enter key, or the tab key doesn't matter.  The question is, DID THEY CHANGE THE SELECTION?  And in the scenarios I described, the answer is, YES, the user changed the selection.

    It sounds like you might want to use the SelectionChanged event instead; that event fires when the selection changes, without regard to whether the user "committed" the change. As I mentioned in the previous paragraph, there is also a TextChanged event, which fires when the text changes; this can be useful when the user types a value in the edit portion, and that change does not cause the selection to change (which can happen if neither the before or after values match an item in the list.

Reply Children