Hi All,
I am using Infragistics UltraCombo in my window application, I have written some logic in Lastfocus event of Ultracombo box, but when executing the application when i click the Ultracombo it's getting executed UltraCombo Lastfocus event. that too it's executing the same event more than 5 times.
Please let me know why it's executing like this.
Thanks
Mohan
Thank you immensely for explaining why Lostfocus does NOT work in Ultracombo. I've lost a week on it !!!
Hi Mohan,
I assume you mean LostFocus. You should not use LostFocus, really. Microsoft even advises against it because this event is tied directly to Windows messages and won't always make sense to a DotNet developer. You should use the Leave event instead. Just in case you are curious, the reason LostFocus is firing when you click on the control is because the UltraCombo uses a TextBox for editing. So when you click on the control, it gets focus and then it immediately creates a TextBox and positions it over the Combo and sets focus to the TextBox. Thus the TextBox gets focus and the Combo loses it. Hence one reason why Enter and Leave perferrable to GotFocus/LostFocus.