Unplanned
Last Updated: 20 Mar 2023 11:40 by ADMIN

Use the following code and try to scroll item by item with the mouse wheel:

        public RadForm1()
        {
            InitializeComponent();

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));
            for (int i = 0; i < 20; i++)
            {
                dt.Rows.Add(i, "Item"+i);
            }
            this.radMultiColumnComboBox1.DisplayMember = "Name";
            this.radMultiColumnComboBox1.ValueMember = "Id";
            this.radMultiColumnComboBox1.DataSource = dt;
            this.radMultiColumnComboBox1.ScrollOnMouseWheel = true;
            this.radMultiColumnComboBox1.SelectedValueChanged+=radMultiColumnComboBox1_SelectedValueChanged;
        }

        private void radMultiColumnComboBox1_SelectedValueChanged(object sender, EventArgs e)
        {
            Console.WriteLine("Value: "+this.radMultiColumnComboBox1.SelectedValue);
        }

Expected behavior: one item is scrolled at a time

Actual behavior: two items are scrolled at a time

Note: RadDropDownList behaves as expected.

 

Unplanned
Last Updated: 18 Dec 2023 12:10 by ADMIN

In this particular case, the RadMultiColumnComboBoxElement is used as a custom editor inside RadPropertyGrid control. When the editor is shown it needs to be opened 3 times to correctly calculate its width. In addition, the font is scaled twice:

Unplanned
Last Updated: 30 Mar 2016 09:22 by Jesse Dyck
Steps to reproduce:
1) Add RadGridView control
2) Add GridViewMultiComboBoxColumn column:

            GridViewMultiComboBoxColumn multiCoomboBoxColumn = new GridViewMultiComboBoxColumn();
            multiCoomboBoxColumn.DataSource = customTable;
        

Workaround:
do not set the DropDownHeight 
property. Instead, you could set the AutoSizeDropDownToBestFit property to true and the MaxDropDownItems property, which gets or sets the maximum number of items to be shown in the drop-down portion. Here is a sample code snippet:
RadMultiColumnComboBoxElement element = e.ActiveEditor as RadMultiColumnComboBoxElement;
element.AutoSizeDropDownToBestFit = true;
element.MaxDropDownItems = 20;
Unplanned
Last Updated: 30 Mar 2016 09:32 by ADMIN
To reproduce:

private void Form1_Load(object sender, EventArgs e)
        {
            this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);

            this.radMultiColumnComboBox1.DataSource = this.categoriesBindingSource;
            this.radMultiColumnComboBox1.DisplayMember = "CategoryName";
            this.radMultiColumnComboBox1.ValueMember = "CategoryID";

            this.radMultiColumnComboBox1.EditorControl.EnableFiltering = true;
            this.radMultiColumnComboBox1.EditorControl.ShowHeaderCellButtons = true;
        }

Workaround:

 public Form1()
 {
     InitializeComponent();
     this.radMultiColumnComboBox1.MultiColumnComboBoxElement.PopupClosing += MultiColumnComboBoxElement_PopupClosing;
     this.radMultiColumnComboBox1.EditorControl.FilterPopupInitialized += EditorControl_FilterPopupInitialized;
 }

 private void EditorControl_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
 {
     RadListFilterPopup filterPopup = e.FilterPopup as RadListFilterPopup;
     if (filterPopup != null)
     {
         filterPopup.PopupOpened -= filterPopup_PopupOpened;
         filterPopup.PopupOpened += filterPopup_PopupOpened;
         filterPopup.PopupClosed -= filterPopup_PopupClosed;
         filterPopup.PopupClosed += filterPopup_PopupClosed;
     }
 }

 bool shouldCancel = false;

 private void filterPopup_PopupClosed(object sender, RadPopupClosedEventArgs args)
 {
     shouldCancel = false;
 }

 private void filterPopup_PopupOpened(object sender, EventArgs args)
 {
     shouldCancel = true;
 }

 private void MultiColumnComboBoxElement_PopupClosing(object sender, RadPopupClosingEventArgs args)
 {
     args.Cancel = shouldCancel;
 }
Unplanned
Last Updated: 30 Mar 2016 09:32 by ADMIN
To reproduce:
- Add some items to the control and set the DropDownAnimationEnabled to false.
- Programmatically select the  third item
- Start the application, open the drop down and scroll up with the mouse - you will notice that the grid is not scrolled up.

Workaround:
Set DropDownAnimationEnabled to true.
Unplanned
Last Updated: 30 Mar 2016 09:33 by ADMIN
To reproduce:
- Bind the control and set the auto filter functionality.
- Type a value and press the tab key or click ouside of the control.
- Subscribe to the DropDownClosed event and observe that the SelectedValue and the text are different.

Workaround:
void radMultiColumnComboBox1_DropDownClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args)
{
    this.radMultiColumnComboBox1.Text = this.radMultiColumnComboBox1.SelectedValue.ToString();
}

Unplanned
Last Updated: 30 Mar 2016 09:34 by ADMIN
To reproduce:
- Add 200k rows and the call the BestFitColumns method like this (only the visual rows should be measured in this case):
this.radMultiColumnComboBox.BestFitColumns(true, false);

Workaround:
Set the AutoSizeDropDownColumnMode before calling the method:
this.radMultiColumnComboBox.MultiColumnComboBoxElement.AutoSizeDropDownColumnMode = BestFitColumnMode.DisplayedCells;
this.radMultiColumnComboBox.BestFitColumns(true, false);
Unplanned
Last Updated: 12 Feb 2018 10:50 by ADMIN
To reproduce:
- Add a GridViewMultiComboBoxColumn to a grid with wide columns.
- Call the following code in the CellEditorInitialized event handler

editor.EditorControl.LoadElementTree();
editor.AutoSizeDropDownHeight = true;

editor.AutoSizeDropDownColumnMode = BestFitColumnMode.AllCells;
editor.BestFitColumns(true, true);

- The drop down still has a horizontal scrollbar. 

Workaround:
editor.EditorControl.BestFitColumns(BestFitColumnMode.AllCells);

int desiredWidth = 0;
foreach (GridViewColumn column in editor.EditorControl.TableElement.ViewElement.RowLayout.RenderColumns)
{
    desiredWidth += column.Width + editor.EditorControl.TableElement.CellSpacing;
    desiredWidth -= editor.EditorControl.TableElement.CellSpacing;
}
editor.DropDownWidth = desiredWidth + 20;//20 in case the vertical scroll appears. 

Unplanned
Last Updated: 26 Jun 2018 09:55 by ADMIN
Use attached to reproduce:

- Press button1, open the drop-down and use the mouse wheel.

Workaround:

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;
    }
}


Unplanned
Last Updated: 11 Sep 2018 11:39 by ADMIN
Use attached to reproduce.

- There is still space at the bottom of the grid. 

Workaround:

class MCCM : RadMultiColumnComboBox
{
    protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement()
    {
        return new MCCBElement();
    }
}
class MCCBElement : RadMultiColumnComboBoxElement
{
    protected override Type ThemeEffectiveType
    {
        get { return typeof(RadMultiColumnComboBoxElement);}
    }
    protected override Size GetPopupSize(RadPopupControlBase popup, bool measure)
    {
        var result = base.GetPopupSize(popup, measure);

        GridTableElement tableElement = this.EditorControl.TableElement;
        int height = 0;
        GridTraverser traverser = new GridTraverser(this.EditorControl.MasterView);
        RowElementProvider rowElementProvider = (RowElementProvider)tableElement.RowScroller.ElementProvider;
        while (traverser.MoveNext())
        {
            height += (int)rowElementProvider.GetElementSize(traverser.Current).Height;
            height += this.EditorControl.TableElement.RowSpacing;
            
        }
        return new Size(result.Width, height +1);
    }
}
Unplanned
Last Updated: 07 Apr 2021 13:59 by ADMIN

Using AutoCompleteMode.SuggestAppend caused other issues and I changed it to Suggest.

In the example program I provided if I type in "meadows "  meadows and a space I should get the following Suggested List.

SUGGESTED LIST

Meadows Green

However I get " Meadows" selected with a space at the front of the word.

Sample program that illustrates the issue can be downloaded from here: https://www.dropbox.com/s/8qxhmxai0y4w7qg/FilterMultiColumn.zip?dl=0 

1 2