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:
To reproduce:
1. Run the form with RadMultiColumnCombobox on high dpi.
2. Set SelectedIndex to -1 (no value selected initially)
3. As a result, the first value get displayed in the text area.
When you have a GridViewMultiComboBoxColumn in RadGridView, you can't set a custom size to the dropdown easily.
When RadGridView is unbound and you try to create the columns for the RadMultiColumnComboBox manually, RadGridView throws an exception: "Cannot find column bound to 'field name'"
Shift + Tab navigation causes drop down opening of RadMultiColumnComboBox
The RadMultiColumnComboBox throws exceptions if its data source is empty and the AutoSizeDropDownToBestFit property is set to true.
When auto-filtering is applied to RadMultiColumnComboBox and mouse double click is performed over a row, the selected row is changed to another row.
Current row is selected in RadMultiColumnComboBox when the mouse's left button is released.
Steps to reproduce: 1. Bind a RMCCB to some data source 2. Enable auto filtering 3. Start the app and enter a value in the text editor of RMCCB 4. Press Tab. You will see that the focus is moved away from the RMCCB but the selection is not changed. Also if you try to open the drop down you will see that it has wrong size. Hitting Escape or Enter instead of Tab produces the correct behavior.
If value member's column is not included in EditorControl (the grid) SelectedValue property always returns null.
The RadMultiColumnComboBox control does not update its selection when the user types text in the text field. The expected behavior is that when the user types text and there is a databound item that matches the input, it should be selected. Otherwise, the current selection in the list should be cleared.
radMultiColumnComboBox €“ set AutoFilter to be true and apply filter to radMultiColumnComboBox. Apply the filter in this way so no result is displayed in the drop down. Try to open the drop down and you will see that you cannot.
Set the AnimationEnabled property of RadCalendar and DropDownAnimationEnabled property in RadMultiColumnComboBox to false and there will be no effect.
To reproduce: void Form1_Load(object sender, EventArgs e) { this.radMultiColumnComboBox2.AutoSizeDropDownToBestFit = true; RadMultiColumnComboBoxElement multiColumnComboElement2 = this.radMultiColumnComboBox2.MultiColumnComboBoxElement; multiColumnComboElement2.EditorControl.MasterTemplate.AutoGenerateColumns = true; DataTable dt = GetDataTable(); this.radMultiColumnComboBox2.DataSource = dt; FilterDescriptor descriptor3 = new FilterDescriptor("Station", FilterOperator.Contains, null); this.radMultiColumnComboBox2.EditorControl.FilterDescriptors.Add(descriptor3); FilterDescriptor descriptor4 = new FilterDescriptor("StationName", FilterOperator.Contains, null); this.radMultiColumnComboBox2.EditorControl.FilterDescriptors.Add(descriptor4); this.radMultiColumnComboBox2.EditorControl.FilterDescriptors.LogicalOperator = FilterLogicalOperator.Or; radMultiColumnComboBox2.AutoFilter = true; } private DataTable GetDataTable() { DataTable dt = new DataTable(); dt.Columns.Add("Station"); //, typeof(Int32)); dt.Columns.Add("StationName"); System.Data.DataRow row1 = dt.NewRow(); System.Data.DataRow row2 = dt.NewRow(); System.Data.DataRow row3 = dt.NewRow(); System.Data.DataRow row4 = dt.NewRow(); System.Data.DataRow row5 = dt.NewRow(); System.Data.DataRow row6 = dt.NewRow(); System.Data.DataRow row7 = dt.NewRow(); System.Data.DataRow row8 = dt.NewRow(); System.Data.DataRow row9 = dt.NewRow(); System.Data.DataRow row10 = dt.NewRow(); row1["Station"] = "285"; row1["StationName"] = "Bob"; row2["Station"] = "274"; row2["StationName"] = "Mary"; row3["Station"] = "222"; row3["StationName"] = "Joan"; row4["Station"] = "289"; row4["StationName"] = "William"; row5["Station"] = "385"; row5["StationName"] = "Bob"; row6["Station"] = "374"; row6["StationName"] = "Mary"; row7["Station"] = "331"; row7["StationName"] = "Jane"; row8["Station"] = "389"; row8["StationName"] = "William"; row9["Station"] = "281"; row9["StationName"] = "Bob"; row10["Station"] = "273"; row10["StationName"] = "Mary"; dt.Rows.Add(row1); dt.Rows.Add(row2); dt.Rows.Add(row3); dt.Rows.Add(row4); dt.Rows.Add(row5); dt.Rows.Add(row6); dt.Rows.Add(row7); dt.Rows.Add(row8); dt.Rows.Add(row9); dt.Rows.Add(row10); return dt; } Start the application and type 2738 (273 is the last row), then press the up arrow twice, exception should occur. Workaround: public class MyRadMultiColumnComboBox : RadMultiColumnComboBox { protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement() { return new MyRadMultiColumnComboBoxElement(); } } public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement { protected override void ProcessKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Up) { GridViewRowInfo row = this.GetCurrentRow(true); if (row != null) { int index = row.Index; if (index == -1) { if (this.Rows.Count > 0) { this.EditorControl.CurrentRow = this.Rows[0]; } return; } } } base.ProcessKeyDown(sender, e); } protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } }
I tried upgrading to Q1 2013 and am having a problem with speed. In the past some of these big multi-combos were slow but we were able to speed it up by not using size to fit. Now the speed is horrible, especially for the large table. It looks like nothing is happening for quite a while when I click on the drop down button. WORKAROUND: You can call the LoadElementTree method for every combobox in the end of your Load event handler
To reproduce: - add a RadMultiColumnCombo and bind it to fill with data. Use the following code: this.radMultiColumnComboBox1.EditorControl.SelectionChanged+=EditorControl_SelectionChanged; private void EditorControl_SelectionChanged(object sender, EventArgs e) { radMultiColumnComboBox1.SelectedIndex = -1; } After selecting a new row from the drop down grid, NullReferenceException is thrown.
FIX. RadMultiColumnComboBox. Setting the FormatString to a numeric column to some currency format and changing the column position results in displaying an invalid currency symbol.
To reproduce: Create a ListView or GridView cell element. For example: public class FilterGroupByCell : DetailListViewDataCellElement { private RadMultiColumnComboBoxElement multiColumnComboBox = new RadMultiColumnComboBoxElement(); public FilterGroupByCell(DetailListViewVisualItem owner, ListViewDetailColumn column) : base(owner, column) { } protected override void CreateChildElements() { base.CreateChildElements(); this.multiColumnComboBox.AutoSizeDropDownToBestFit = true; multiColumnComboBox.DropDownSizingMode = SizingMode.UpDownAndRightBottom; multiColumnComboBox.EditorControl.MasterTemplate.AutoGenerateColumns = false; GridViewTextBoxColumn column = new GridViewTextBoxColumn("CustomerID"); column.HeaderText = "Customer ID"; multiColumnComboBox.Columns.Add(column); column = new GridViewTextBoxColumn("ContactName"); column.HeaderText = "Contact Name"; multiColumnComboBox.Columns.Add(column); column = new GridViewTextBoxColumn("ContactTitle"); column.HeaderText = "Contact Title"; multiColumnComboBox.Columns.Add(column); column = new GridViewTextBoxColumn("Country"); column.HeaderText = "Country"; multiColumnComboBox.Columns.Add(column); column = new GridViewTextBoxColumn("Phone"); column.HeaderText = "Phone"; multiColumnComboBox.Columns.Add(column); this.Children.Add(multiColumnComboBox); } public override void Synchronize() { base.Synchronize(); this.Text = ""; if (base.Row == null) { return; } this.CurrentFilter = (MFilter)base.Row.DataBoundItem; if (CurrentFilter.CustomListRecordId == "1") multiColumnComboBox.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; DataTable table1 = new DataTable("test"); table1.Columns.Add("CustomerID"); table1.Columns.Add("ContactName"); table1.Columns.Add("ContactTitle"); table1.Columns.Add("Country"); table1.Columns.Add("Phone"); table1.Rows.Add(1, "Ivan Petrov", "2", "2", "2"); table1.Rows.Add(2, "Stefan Muler", "2", "2", "2"); table1.Rows.Add(3, "Alexandro Ricco", "2", "2", "2"); multiColumnComboBox.DataSource = table1; multiColumnComboBox.DisplayMember = "ContactName"; } public MFilter CurrentFilter { get; set; } } Workaround: Create a custom RadMultiColumnComboBoxElement: public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement { protected override void OnParentChanged(Telerik.WinControls.RadElement previousParent) { if (this.IsPopupOpen) { this.ClosePopup(RadPopupCloseReason.CloseCalled); } if (this.Parent != null && this.Parent.ElementTree != null && this.Parent.ElementTree.Control is RadGridView) { base.OnParentChanged(previousParent); } } protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } } In order to be able to set a DataSource you need to create a new BindingContext prior setting setting the DataSource: DataTable table1 = new DataTable("test"); table1.Columns.Add("CustomerID"); table1.Columns.Add("ContactName"); table1.Columns.Add("ContactTitle"); table1.Columns.Add("Country"); table1.Columns.Add("Phone"); table1.Rows.Add(1, "Ivan Petrov", "2", "2", "2"); table1.Rows.Add(2, "Stefan Muler", "2", "2", "2"); table1.Rows.Add(3, "Alexandro Ricco", "2", "2", "2"); multiColumnComboBox.EditorControl.BindingContext = new System.Windows.Forms.BindingContext(); multiColumnComboBox.DataSource = table1; multiColumnComboBox.DisplayMember = "ContactName";
workaround this.radMultiColumnComboBox1.ResetText();
To reproduce: - Create a custom cell class and try to add an RadMultiColumnComboBoxElement to its children. Workaround: public class MyMCCBElement : RadMultiColumnComboBoxElement { protected override void OnParentChanged(Telerik.WinControls.RadElement previousParent) { if (this.Parent.ElementTree != null) { base.OnParentChanged(previousParent); } } protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } }