This is a migrated thread and some comments may be shown as answers.

DropDown Scroll Broken

3 Answers 105 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
HCD
Top achievements
Rank 1
HCD asked on 29 Oct 2014, 08:31 PM
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.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 30 Oct 2014, 10:01 AM
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.

 
0
Inelcis
Top achievements
Rank 1
answered on 30 Oct 2014, 04:02 PM
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
0
Stefan
Telerik team
answered on 30 Oct 2014, 04:34 PM
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.

 
Tags
DropDownList
Asked by
HCD
Top achievements
Rank 1
Answers by
Peter
Telerik team
Inelcis
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or