This is a migrated thread and some comments may be shown as answers.
Excel Addin hangs when MCCB is scrolled
3 Answers 6 Views
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 04 May 2018, 10:36 AM

Hi,

I've a problem (again) when the MCCB is used in an Excel addin environment.

If the MCCB is used on a normal form (non modal) and you scroll (mouse wheel) inside the dropdown (grid) then the complete addin hangs.

If you do the same in an modal form, everything works fine.

Sample project is attached (rename to zip)

Steps to reproduce:

    button2 -> opens modal form (OK)
    button1 -> opens non modal form (not OK)
    open dropdown and then scroll inside grid with mouse wheel

Is there any workaround? (even if I have to disable mouse scrolling, would be better than an hanging application)

 

 

 

 

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 07 May 2018, 08:36 AM
Hello Christian,

I have logged this for investigation in our backlog. You can track its progress, subscribe to status changes and add your comment to it here. I have also updated your Telerik Points.

This is caused by how the layout is updated when the scroll is performed inside a drop down. To workaround this you need to create a custom popup form and override the OnMouseWheel event. Here is the code (the other classes are needed for replacing the default popup):
class MyMultiColumnComboPopupForm : MultiColumnComboPopupForm
{
    public MyMultiColumnComboPopupForm(PopupEditorBaseElement owner)
       : base(owner)
    {
 
    }
    public override bool OnMouseWheel(Control target, int delta)
    {
        return true;
    }
}
class MyMCCB : RadMultiColumnComboBox
{
    protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement()
    {
        return new MyMCCBElement();
    }
}
class MyMCCBElement : RadMultiColumnComboBoxElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadMultiColumnComboBoxElement);
        }
    }
    protected override RadPopupControlBase CreatePopupForm()
    {
        var popupForm = new MyMultiColumnComboPopupForm(this);
        popupForm.EditorControl.Focusable = false;
        popupForm.MinimumSize = this.DropDownMaxSize;
        popupForm.MaximumSize = this.DropDownMaxSize;
        popupForm.Height = this.DropDownHeight;
        popupForm.VerticalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToOuterEdges;
        popupForm.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.Smooth;
        popupForm.RightToLeft = this.RightToLeft ? System.Windows.Forms.RightToLeft.Yes : System.Windows.Forms.RightToLeft.Inherit;
        this.WirePopupFormEvents(popupForm);
        return popupForm;
    }
}

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Christian
Top achievements
Rank 1
answered on 08 May 2018, 11:04 AM

Hello Dimitar,

thanks for the workaround.

I've noticed another problem, but not as bad as the scroll bug. If you open the dropdown (by clicking on the arrow), close it and then reopen it, the dropdown flickers and sometimes closes it self (without calling the close... events). This is also a modal/non modal problem. It's reproducible with the same test project from my initial post.

 

0
Accepted
Dimitar
Telerik team
answered on 08 May 2018, 11:24 AM
Hi Christian,

I was able to reproduce this as well. It is caused by the animation. Here is how you can disable it:
radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false;

Let me know if I can assist you further.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Christian
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Christian
Top achievements
Rank 1
Share this question
or