Use attached to reproduce.
Workaround: protected override void OnShown(EventArgs e) { base.OnShown(e); LightVisualElement lve = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextboxContentElement; RadArrowButtonElement arrow = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ArrowButton; lve.MaxSize = new Size(lve.Size.Width - arrow.Size.Width - (int)arrow.Border.Width, 0); }
To reproduce: Add a RadMultiColumnCombobox to the form, set the DropDownStyle property to DropDownList and clear the text. You will notice that the height of the control is not bigger than 5 px. Workaround: set MinimumSize Me.RadMultiColumnComboBox1.MinimumSize = New Size(200, 23)
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); } }
Use attached to reproduce! Workaround The column name must match the field name.
To reproduce: - Set the DropDownStyle to DropDownList
To reproduce: run the attached project and refer to the attached gif file. Workaround: this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.TextBoxItem.TextBoxControl.MouseDown += TextBoxControl_MouseDown; private void TextBoxControl_MouseDown(object sender, MouseEventArgs e) { this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.TextBoxItem.TextBoxControl.SelectAll(); }
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; } }
At the moment when the control receives the focus the text gets selected. if the AllowShowFocusCues property is set to true and the DropDownStyle is set to DropDownList the focus cues should be painted similarly as in RadDropDownList this.radMultiColumnComboBox1.AllowShowFocusCues = true; this.radMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
To reproduce: - When the filter is set to contains the item is different than the item is selected from the drop-down and the text is taken from the append functionality. Workaround Either change the filter to StarrtsWith or remove the suggest functionality.
To reproduce: this.radMultiColumnComboBox1.DataSource = this.customersBindingSource; this.radMultiColumnComboBox1.DisplayMember = "CustomerID"; this.radMultiColumnComboBox1.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = this.radMultiColumnComboBox1.DisplayMember; filter.Operator = FilterOperator.Contains; this.radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); 1. Click the dropdown button, verify that all items list on drop down 2. Type into the textbox so only one item is left( e.g. "BERGS" ) 3. While the drop-down is still opened, click the arrow button. 4. Focus another control on the form and then when the user clicks the arrow button, only one item is still shown in the drop down. Workaround: private void radMultiColumnComboBox1_DropDownClosed(object sender, RadPopupClosedEventArgs args) { this.radMultiColumnComboBox1.EditorControl.MasterTemplate.Refresh(); }
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.
To reproduce: please refer to the attached sample project and refer to the screenshot. You will notice that initially, the arrow is a few pixels up. If you disable and then enable the RadMultiColumnComboBox again you will notice the difference. Workaround: private void radToggleButton1_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args) { ImagePrimitive img = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ArrowButton.FindDescendant<ImagePrimitive>(); img.Margin = new Padding(0); if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On) { this.radMultiColumnComboBox1.Enabled = true; this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ArrowButton.Padding = new Padding(0); } else { this.radMultiColumnComboBox1.Enabled = false; } }
To reproduce: Type "Th" into the multi-column combo box in the attached project. Then press and hold the Backspace key until "Th" is deleted. Then release Backspace key. There remain only the filtered options in the dropdown. If I press and release the backspace key 1x for each typed letter, then the dropdown repopulates as expected. Workaround: private void radMultiColumnComboBox1_TextChanged(object sender, EventArgs e) { this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ApplyFilter(); }
To reproduce: please refer to the attached sample project which result is illustrated in the attached gif file. The DropDownClosed is expected to be fired when the drop down is already closed. Hence, showing a message box shouldn't keep the drop down opened. The problem is reproducible with RadDropDownList as well. Note that this problem is not applicable for MS ComboBox. Workaround: this.radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false;
To reproduce: please refer to the attached sample project and try to enter some numeric value or clear the existing one. Then open the popup. Workaround: use the custom filtering that RadGridView offers http://docs.telerik.com/devtools/winforms/gridview/filtering/custom-filtering this.radMultiColumnComboBox1.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = this.radMultiColumnComboBox1.DisplayMember; filter.Operator = FilterOperator.Contains; this.radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); this.radMultiColumnComboBox1.EditorControl.EnableCustomFiltering = true; this.radMultiColumnComboBox1.EditorControl.CustomFiltering += EditorControl_CustomFiltering; string search = string.Empty; private void EditorControl_CustomFiltering(object sender, Telerik.WinControls.UI.GridViewCustomFilteringEventArgs e) { search = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorElement.Text; if (search != string.Empty) { e.Handled = true; e.Visible = e.Row.Cells[this.radMultiColumnComboBox1.DisplayMember].Value.ToString().Contains(search); } else { e.Handled = false; } }
To reproduce: DataTable dt = new DataTable(); dt.Columns.Add("ID"); dt.Columns.Add("Description"); dt.Rows.Add(new object[] { "0", "Low" }); dt.Rows.Add(new object[] { "1", "Medium" }); dt.Rows.Add(new object[] { "2", "High" }); radMultiColumnComboBox1.DisplayMember = "ID"; radMultiColumnComboBox1.ValueMember = "ID"; radMultiColumnComboBox1.DataSource = dt; radMultiColumnComboBox1.SelectedValue = "1"; this.radMultiColumnComboBox1.SelectedValueChanged+=radMultiColumnComboBox1_SelectedValueChanged; private void radMultiColumnComboBox1_SelectedValueChanged(object sender, EventArgs e) { Console.WriteLine(this.radMultiColumnComboBox1.SelectedValue); } If you type 2 in the editable part, the SelectedValue is not changed as in the previous version. Workaround: public class MyRadMultiColumnComboBox : RadMultiColumnComboBox { public override string ThemeClassName { get { return typeof(RadMultiColumnComboBox).FullName; } } protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement() { return new MyRadMultiColumnComboBoxElement(); } } public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement { protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } protected override void SetActiveItem(string text) { int rowIndex = this.FindItemIndexExact(text); if (rowIndex != -1) { this.EditorControl.CurrentRow = this.EditorControl.Rows[rowIndex]; this.textBox.SelectionStart = this.textBox.Text.Length; } } }
Use attached project to reproduce. Workarond: radMultiColumnComboBox1.AutoSize = false; radMultiColumnComboBox1.MinimumSize = new Size(0, 22);
How to reproduce: check the attached project and video Workaround: create a custom RadMultiColumnComboBoxElement Public Class MyRadMultiColumnComboBox Inherits RadMultiColumnComboBox Public Overrides Property ThemeClassName As String Get Return GetType(RadMultiColumnComboBox).FullName End Get Set(value As String) MyBase.ThemeClassName = value End Set End Property Protected Overrides Function CreateMultiColumnComboBoxElement() As RadMultiColumnComboBoxElement Return New MyRadMultiColumnComboBoxEleemnt() End Function End Class Class MyRadMultiColumnComboBoxEleemnt Inherits RadMultiColumnComboBoxElement Protected Overrides ReadOnly Property ThemeEffectiveType() As Type Get Return GetType(RadMultiColumnComboBoxElement) End Get End Property Protected Overrides Sub SetActiveItem(item As String) Dim rowIndex As Integer = Me.FindItemIndexExact(Text) If rowIndex <> -1 Then Me.textBox.SelectionStart = Me.textBox.Text.Length End If End Sub End Class
Workaround: create a custom RadMultiColumnComboBox control with a custom element. You can also check the attached project. public class MyRadMultiColumnComboBox : RadMultiColumnComboBox { public override string ThemeClassName { get { return typeof(RadMultiColumnComboBox).FullName; } } protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement() { return new MyRadMultiColumnComboBoxElement(); } } public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement { protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } protected override void ProcessKeyDown(object sender, KeyEventArgs e) { base.ProcessKeyDown(sender, e); if (this.IsPopupOpen && (e.KeyCode == Keys.PageDown || e.KeyCode == Keys.PageUp)) { this.EditorControl.GridBehavior.ProcessKey(e); } } }