We have a UltraCombo which is bound to a datatable. When we type in the combo and the text does not match any of the rows in the dropdown the cursor does not jump but as soon as it matches a row and that matched row becomes selected - appears to be default behaviour - the carret jumps to the beginning of the combo so we prefix any extra text typed instead of appending to text.
Can someone help us with why the cursor jumps to the start when the text matches a row in the dropdown?
Hi,
What version of the controls are you using?
Is the combo being used by itself or in a grid or some other control?
We're on version 9.2.20092.1003 and the control is a child of a Form only.
Attached is a simple project which replicates our problem. The values start in upper case but if you type "boom" (lower case 'b') once you type the 'm' the text in the combo changes to "Boom" and the caret moves to the start of the word. Can you help us keep the caret at the end please?
thanks.
I ran your sample and I think the problem here is that you are changing the DataSource of the UltraCombo inside the ValueChanged event. This is really not a good idea because the combo is attempting to search the list for a match and at the same time, you are changing the list.
In the sample you attached here, you are simply setting the datasource to essentially the same table every time. I assume that this was just an example and your real application is actually changing the daa in the list each time - perhaps because you are trying to implement your own AutoSuggest functionality?
If that's what you want, then I recommend updating to the latest version of NetAdvantage, which has AutoSuggest built-in.
Or, use the ColumnFilters on the UltraDropDown to simply filter the list rather than re-setting the DataSource.
You are correct in all of your assumptions - the example did indeed bind the same datasource on the value changed event but in reality we bind a different datasource on that event.
Unfortunately due to our architecture we have to rebind the datasource more than once - a webserver provides us our data and there is too much to send over the wire and bind all of it.
We will look into upgrading to tackle this. Thanks for your help.
I don't know if this will work, but you might want to simply try using a different event, like KeyDown/KeyUp.
Or maybe instead of setting the DataSource directly from inside ValueChanged, use a BeginInvoke to call a method that does it. That will introduce a small delay that might be enough to make it work, since the DataSource will not be changing while the Value is changing at the same time.
Unfortunately the call made out to our webserver invoked by the ValueChanged event is put on a background thread already.