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
1105
UltraCombo drop down behavior
posted

I'm trying to decide whether what I'm seeing with the UltraCombo is a bug / feature / just the way it works and I'm hoping someone could give me an explanation of the behavior I'm seeing.

Infragistics version: 13.2.20132.2010

I've attached a sample project that's pretty simple.  It's a form that contains an ultra combo, the combo is bound to a data table that contains 2 columns and 5 rows of names.  In the keypress event, I've added a line of code that checks to see if the combo is dropped down, if not it does a PerformAction.DropDown so that the combo always drops on typing.

Performing the following steps:

1) type "aasdfasdfadfasdf".  The drop down drops, no line is selected because there is no match (makes sense).

2) click the drop down arrow to close up.

3) click the drop down arrow to drop down (the value remains in the text box)

4) click the drop down arrow to close up.

5) now, mouse click into the center of the text field's value so that the cursor is indicated, then type a character

6) the drop down drops, but instead of the character appearing in the middle of the original text, the original text is wiped out and only the typed character remains.

I would expect the typed character to just insert into the text (and that's the behavior I'm hoping for that's not happening).  If that's how it's supposed to work, then it seems inconsistent that manually opening / closing the drop down doesn't clear the text as well.

I can go into the background of why this is necessary, but I don't think it's relevant to the question what's going on here and why is it doing what it's doing.

Thanks in advance,

Chris Rowland

WindowsFormsApplication1.zip
Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Chris,

    When you drop down the combo, all of the text is selected. So what's happening here is that you get the KeyPress event and the combo drops down and selects all of the text. Then the combo continues to process the key you typed and it replaces the entire selection.

    I don't see any simple way around this. My advice would be to use the Enter event to drop down the combo instead of KeyDown.

Reply Children
No Data