Hi, I am using ultra combo in my application. I set DataSource , ValueMember and DisplayMember properties. As well as set LimitToList is equal to True and Auto complete mode to SuggestAppend. But if user type text same as value members any value then it is selecting that record.e.g. Suppose I have 5 items in my data source as below ID Value 1 ABC 2 ACD 3 EFG 4 XYZ 5 PQRif I press 1 then it select ABC in combo box on change of focus. How to prevent this? Is there any property we want to set?Thanks & Regards,Ganesh
Hi Ganesh,
I don't beleive there is any way to stop it from doing this. Since there's a 1 on the list, it will find it when it goes to search. You could, of course, implement your own validation on the cell instead of using IsItemInList.
Mike Saltzman"] implement your own validation on the cell instead of using IsItemInList.
implement your own validation on the cell instead of using IsItemInList.
Hi mike,It is not a problem of Limit to List property but it is problem of auto suggest mode.I am setting Value member as a ID and Displaymember is Value. If you type 'A' in text box then by default it append 'BC' and it will show drop down with two values 'ABC' and 'ACD'.If I press tab then it is selecting 'ABC'. which is default behavior of UltraComboBox and Windows ComboBox. But if you type '2' in empty text box of UltraCombo and press tab then it selecting 'ACD' in text box which is not happening in normal Windows ComboBox it showing there '2' in text box. How to prevent this?
or Is it a UltraCombo Bug?
Ganesh
No, this is not a bug. If the text you type into the combo doesn't match anything in the DisplayMember column, then the column tries to match it up with the ValueMember. Everything here is working as intended. There is no way to turn this off.
Hi Manuel,
Well, you can, of course, validate the data yourself in code. You could cast the UltraComboEditor into an IValueList and use the GetValue method to search the list for the text. The out param returns the index of the row that was found, so if it returns -1, the text was not found and you could dislay an error. If you do this in the Validating event of the control, you can cancel the event and keep focus.
Hi Mike,
I'm experiencing the same problem:
In my datastructure I have an internal Id of my customer-records (primary key) and a user-defined customer-number (alternative key). I use the UltraComboEditor in a UltraGrid to enter the customer-numbers of orders.
If a user (mis)types a customer-number that exists only as an internal Id the combobox selects that customer-record and no validation-error occurs. So if a user doesn't pay attention the order goes to the wrong customer!
You say there is no way to turn this behaviour off. Do you might have a suggestion how to solve this problem (custom validation code, other control, ..)?
Thanks
Manuel
Using Version 8.2, .Net 2.0