Mouse scrollwheel changes RadDropdownList even when you click away

3 posts, 0 answers
  1. Lou
    Lou avatar
    61 posts
    Member since:
    Aug 2014

    Posted 05 Jun 2015 Link to this post

    Hi,

    If you have a RadDropdownList on a form at run-time and the user clicks on it, and then decides to click on the form itself (not another control) the mousewheel can still be used to change the RadDropdownList contents.

    This seems like it could lead to accidental changes to the RadDropdownList's contents. 

    Is this by design? Is there a simple way to prevent this behavior?

    Thanks,

    -Lou

  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 08 Jun 2015 Link to this post

    Hello Lou,

    Thank you for writing.

    Yes this is the default behavior, the drop down is closed but the control is still focused. This is why you are still able to change the items with the wheel.

    One way to solve this is to just disable the mouse wheel:
    radDropDownList1.EnableMouseWheel = false;

    Another approach is to set this property when the popup is opened and then closed. This way wheel will work only if the drop down is opened:
    void radDropDownList1_PopupOpened(object sender, EventArgs e)
    {
        radDropDownList1.EnableMouseWheel = true;
    }
     
    void radDropDownList1_PopupClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args)
    {
        radDropDownList1.EnableMouseWheel = false;
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lou
    Lou avatar
    61 posts
    Member since:
    Aug 2014

    Posted 08 Jun 2015 in reply to Dimitar Link to this post

    OK - thanks for the information Dimitar.

     -Lou

Back to Top