Hello,
I have a UltraCombo with the property LimitToList set to true, but when some is tryprd that doesn't exist in the combo box the focus will not go outside of the combo box until a value is selected that exists in the combo. What I need is the ability enable a button when something is typed that doesn't exist in the combo and allow the user to be able to click that button without having to make a valid selection in the combo box. I don't want to lose the LimitToList funtionality because they like to be able to type to see if the value exists in the combo box.
Thanks in advance for any help.
Kris
Hi Kris,
It sounds like you could do what you want by using the ItemNotInList event and prompting the user with a MessageBox or another dialog to allow them to create the new contact record.
Another option would be to use add a button the Combo itself using ButtonsRight or ButtonsLeft. A user could click this button without losing focus on the control, so the LimitToList would not be a problem.
BTW, if you set DropDownStyle to DropDownList, the user can still type into the combo and find a match. The searching works a little differently by default, though. It only searches the first character. But you can change this by setting AutoComplete or AutoEdit (I forget which) to true.
Hi Mike,
Here is my situation. The combo box is filled with contact names, and if the user types is a name in the combo and the name doesn't exist in the list then I want them to be able to click a button to create a contact record.
What I would like is the type ahead feature so they can go through the list by typing, but I also don't want them to be able type in a name that doesn't exist in the combo. I tried setting DropDownStyle to DropDownList but the type ahead feature doesn't work then.
It would be great if as they typed and a match wasn't found in the list then the key stroke is cancelled that way they could only key in items that exist is the list.
I hope that is clearer.
If I can't get it to work that way then I will just remove the LimitToList and do a check to see if the item exists in the list.
Thanks for your help.
I'm not sure I understand the question. You seem to be asking how you can have LimitToList and not have LimitToList at the same time. This is, of course, not possible.
The whole point of LimitToList is that it does not allow the user to leave the control with a value that is not on the list.