DropDownList GotFocus Event is not being fired. When I Change the property DropDownStyle to DropDownList then it is being fired.
The Scenario is I have a form, in it's load event i am binding the events which are lying on some other file with different fields. Events are GotFocus and Lost Focus to behave identically when control got focus or lost focus, i made a common event handler and bind that handle with all fields on form load time. all fields are working well but DropDownList control works only when i change its DropDownStyle property to DropDownList.
I dont know why its behaving like this did i miss something ??
4 Answers, 1 is accepted
Thank you for writing.
I was not able to reproduce the observed behavior on my end. For convenience, I prepared a small sample, based on the information that you provided so far and attached it to this thread. Could you please check it and let me know what I need to change in order to reproduce this?
Thank you in advance for your patience and cooperation.
Regards,
Dimitar
Telerik by Progress
I make the necessary changes
kindly rename the file from 1070932.jpg to 1070932.jpg and extract the files in to your project folder
kindly see the CommonEventHandler Class
Kindly Change the property DropDownStyle of DropDownList From DropDown to DropDownList and vise versa and see the behavior.
Regards
When the DropDownStyle is set to DropDown the DropDownList is hosting a TextBox inside it. And in this case, the TextBox is gaining the focus. So when the TextBox gains the focus the BackColor of the DropDownList s reset. I have attached an updated version of the CommonEventHandler which shows how you can handle this.
I hope this will be useful.
Regards,
Dimitar
Telerik by Progress