Approved
Last Updated: 24 Oct 2018 06:53 by ADMIN
ADMIN
Hristo
Created on: 22 Oct 2018 07:23
Category: GridView
Type: Bug Report
0
FIX. RadMultiColumnComboBox - DropDown is closed when clicking the SearchRow inside the grid and the DropDownStyle of the control is set to DropDownList
To reproduce:
1. Add a RadMultiColumnComboBox and populate it with data.
2. Set the DropDownStyle property of the control to DropDownList
3. Set the EditorControl.AllowSearchRow and the AutoSizeDropDownToBestFit properties to true .
4. When you open the drop down and try to use the search row (e.g. clicking over the arrow buttons), the drop down is closed.

Workaround: 
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();

        this.radMultiColumnComboBox1.EditorControl.AllowSearchRow = true;
        this.radMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
        this.radMultiColumnComboBox1.DropDownClosing += RadMultiColumnComboBox1_DropDownClosing;
    }

    private void RadMultiColumnComboBox1_DropDownClosing(object sender, RadPopupClosingEventArgs args)
    {
        Point position = this.radMultiColumnComboBox1.EditorControl.PointToClient(Cursor.Position);

        Telerik.WinControls.RadElement searchElement = this.radMultiColumnComboBox1.EditorControl.ElementTree.GetElementAtPoint(position);
        if (searchElement != null)
        {
            GridSearchCellElement parent = searchElement.FindAncestor<GridSearchCellElement>();
            if (parent != null)
            {
                args.Cancel = true;
            }
        }
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments