Completed
Last Updated: 10 Dec 2014 11:50 by ADMIN
ADMIN
George
Created on: 29 Oct 2014 08:58
Category: MultiColumnCombo
Type: Bug Report
1
FIX. RadMultiColumnComboBox - The dropdown is not sized correctly when there is only one record
To reproduce:

Add a RadMultiColumnComboBox with one row. Open and close the dropdown, you will see that the scrollbars will show and hide with every openning

Workaround:

Use the following 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