Completed
Last Updated: 31 Aug 2020 14:39 by ADMIN
Release R3 2020
ADMIN
George
Created on: 29 Oct 2014 09:07
Category: MultiColumnCombo
Type: Bug Report
0
FIX. RadMultiColumnComboBox - when there are two rows the DropDown is sized correctly only the first time it is opened
To reproduce:

Add a RadMultiColumnComboBox with two rows. Open the dropdown, you will see no scrollbars, open it again and scrollbars will be visible.

Workaround:

Use the following custom class:

public class MCCB : RadMultiColumnComboBox
{
    protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement()
    {
        return new MCCBElement();
    }
}

public class MCCBElement : RadMultiColumnComboBoxElement
{
    protected override Size GetPopupSize(RadPopupControlBase popup, bool measure)
    {
        Size baseSize = base.GetPopupSize(popup, measure);

        RadScrollBarElement hScrollBarElement = this.EditorControl.TableElement.HScrollBar;
        baseSize.Height += (int)hScrollBarElement.ControlBoundingRectangle.Size.Height;

        return baseSize;
    }

    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadMultiColumnComboBoxElement);
        }
    }
}
0 comments