Hi
I'm using an UltraCombo with a BindingList bound to it.
I'd like to implement my own AutoCompletion feature. Therefore I've set the AutoCompleteMode to None, on KeyDown, the Combo is dropped down explicitly having the appropriate column filters set.
This works fine, but when the combo is dropped down, the so far entered text in the textbox is completely selected. It would be nicer if the caret would maintain its position, so that the user is can continue typing without overwriting the text portion he already entered.
I've already tried to override this behaviour by clearing the text selection and setting the caret to the end in the AfterDropDown event. But this does not help.
Is there another way to do this?
Thanks in advance!
It's not requires except in circumstances where timing issues occur which prevent you from doing what you want to do.It's essentially a workaround to a problem that was simply not anticipated when the grid was originally developed.
Thanks for the explanation. Is the MethodInvoker method required for all events, some, etc? How do you know when to use it?
Because the control sets the selection after the event fires. So anything you do directly inside the event will be overriden by the control behavior. The BeginInvoke institutes a delay so that the code does not get executed until the control processing is done.
Hello,
In the example posted above, why not just call the SetSelection method directly instead of through the MethodInvoker call?
Hi Mike
thanks a lot for your help! we would invite you for a beer if you were living a bit closer to us :-)
greetings from Switzerland, olivier