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
740
Autocompletemode for numbers in Ultracomboeditor
posted

Hi there, I'm using ultracomboeditor with dropdownstyle set to 'DropDownList'. Also I have set the autocomplete mode to "Append'.

My drop down has the following values: eg. Value set to intger eg. "1", display text set to eg. "1. test1"

Following are sample display text values:

1. test1

2. test 2

3. test 3

4. test 4

11. test 11

26. test 26

30. test 30

31. test 31

32. test 32

33. test 33

34. test 34

When the form loads, I key in "2" in the dropdown and it goes to the "26. test26" value which is correct. Then i key in "3" in the dropdown, which then it will go straight to "30. test 30" but NOT to "3. test 3". I want when I'm in 26, and when i press '3', it should go to "3. test 3".

Is it the normail behaviour?? Why cant we go to the top of the list to search?

my code: this.uComboBillingGroup.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.Append;

this.uComboBillingGroup.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;

this.uComboBillingGroup.DataSource = dt; this.uComboBillingGroup.ValueMember = "group_id";

this.uComboBillingGroup.Value = bill_id;

this.uComboBillingGroup.DisplayMember = "description";

Could u please be able to help me with a solution ASAP??

Thanks in Advance!! NW

Parents
  • 71886
    Offline posted

    Hello,

    Could you please try the following code and let me know if it works for you:

            private void ultraComboEditor1_KeyPress(object sender, KeyPressEventArgs e)

            {

                if (!ultraComboEditor1.Text.ToString().StartsWith(e.KeyChar.ToString()))

                {

                    ultraComboEditor1.SelectedItem = ultraComboEditor1.ValueList.FindByDataValue(e.KeyChar.ToString());

                }

            }

Reply Children