DropDown Scroll Broken

4 posts, 0 answers
  1. HCD
    HCD avatar
    1 posts
    Member since:
    Oct 2014

    Posted 29 Oct 2014 Link to this post

    The latest release - Q3 2014 - has broken the dropdown control unless we are overlooking something.

    Create a RadForm, drop a RadDropDownList control on the form.

    Add _8_ items (enough so it goes beyond what shows in the list when you click the drop down) to the dropdown list.

    Run the program.

    Click the dropdown and you see items 1 through 6, now try to scroll to see items 7 and 8.  The dropdown immediately closes.

    Unless we are overlooking something this seems fairly serious as it more or less breaks any app that uses the simplest of dropdown.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 30 Oct 2014 Link to this post

    Hello,

    Thank you for this report.

    I was able to reproduce the undesired behavior and can confirm that there is a regression bug introduced in Q3 2014. You can track the status of the issue here. We will do our best to address it for the upcoming Service Pack.

    As a workaround you should subscribe for PopupClosing event:
    this.radDropDownList1.PopupClosing += radComboDemo_PopupClosing;
    void radComboDemo_PopupClosing(object sender, RadPopupClosingEventArgs args)
    {
                Point relativeMousePositionInPopup = ((RadDropDownListElement)sender).ListElement.ElementTree.Control.PointToClient(Control.MousePosition);
                args.Cancel = ((RadDropDownListElement)sender).ListElement.VScrollBar.ControlBoundingRectangle.Contains(relativeMousePositionInPopup);           
    }

    Your Telerik Points have been updated for this report.

    Regards,
    Peter
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Inelcis
    Inelcis avatar
    6 posts
    Member since:
    Dec 2013

    Posted 30 Oct 2014 in reply to Peter Link to this post

    I am also having this problem. It is very important that this issue is addressed because although your workaround works I have several dropdownlist across my aplication and I don't want to add this workaround to every single dropdownlist
  5. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 30 Oct 2014 Link to this post

    Hello Inelcis,

    Thank you for writing.

    As my colleague Peter mentioned, we are aware of this issue and we will address it in the upcoming Service Pack, which should be out at the end of November. If this time frame is not suitable for you, you can use one of the workarounds provided on the issue page: http://feedback.telerik.com/Project/154/Feedback/Details/141792-fix-raddropdown-popup-is-closed-when-click-the-scrollbar.

    As you to not want to apply the below proposed workaround to every instance of the control, you can use the second one, which is to inherit the control, apply the workaround there and replace the instances of RadDropDownList in your application with the derived type (you can use Search & Replace to apply the change easily). Here is the derived class for your convenience:
    class MyDropDownList : RadDropDownList
    {
        public MyDropDownList()
        {
            this.PopupClosing += MyDropDownList_PopupClosing;
        }
      
        void MyDropDownList_PopupClosing(object sender, RadPopupClosingEventArgs args)
        {
            Point relativeMousePositionInPopup = ((RadDropDownListElement)sender).ListElement.ElementTree.Control.PointToClient(Control.MousePosition);
            args.Cancel = ((RadDropDownListElement)sender).ListElement.VScrollBar.ControlBoundingRectangle.Contains(relativeMousePositionInPopup);
        }
      
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadDropDownList).FullName;
            }
        }
    }

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top