This is a migrated thread and some comments may be shown as answers.
RadDropDownList: MouseEnter event for the entire control
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Faithful Eli
Top achievements
Rank 1
Faithful Eli asked on 19 Feb 2020, 10:00 AM

Hi,

I would to ask which element in RadDropDownList control where if I invoke the MouseEnter event, it able to capture the entire control.

Upon trying, each element only cover parts of the control. So when I have MouseEnter and MouseLeave, after mouse hover on the dropdown border, MouseEnter will be invoke immediately, but then at the same time will invoke MouseLeave immediately even though the mouse pointer still within the RadDropDownList control.

I appreciate your help on this.

Thank you!

1 Answer, 1 is accepted

Sort by
0
Nadya
Telerik team
answered on 21 Feb 2020, 04:00 PM

Hello Faithful Eli,

I would like to clarify that RadDropDownList internally hosts TextBox control. When you hover the dropdownlist control the MousEnter is invoked and then the mouse captures the hosted text box control. This results in firing the MouseLeave event of the control and MouseEnter event of the hosted text box. This is why I can suggest handling the mouse events of the text box control:

this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.HostedControl.MouseEnter += this.HostedControl_MouseEnter;
private void HostedControl_MouseEnter(object sender, EventArgs e)
        {
            
        }

You can refer to the following forum thread as well that might be useful: https://www.telerik.com/forums/how-to-change-dropdownlist-colors-and-style

However, if you are experiencing any further difficulties I would kindly ask you to provide more information about the exact scenario that you are trying to achieve. Thus, we will be able to think of a suitable solution and assist you with this case.

I hope this information is useful. Do not hesitate to contact me if you have other questions.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
Faithful Eli
Top achievements
Rank 1
Answers by
Nadya
Telerik team
Share this question
or