To reproduce: public Form1() { InitializeComponent(); Random r = new Random(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("Name", typeof(string)); table.Columns.Add("Bool", typeof(bool)); table.Columns.Add("DateColumn", typeof(DateTime)); for (int i = 0; i < 10; i++) { table.Rows.Add(i, "Row " + i, r.Next(10) > 5 ? true : false, DateTime.Now.AddHours(i)); } radMultiColumnComboBox1.DataSource = table; radMultiColumnComboBox1.EditorControl.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; radMultiColumnComboBox1.DropDownMinSize = new Size(500, 500); } To work around: radMultiColumnComboBox1.DropDownOpening += new Telerik.WinControls.UI.RadPopupOpeningEventHandler(radMultiColumnComboBox1_DropDownOpening); void radMultiColumnComboBox1_DropDownOpening(object sender, CancelEventArgs args) { radMultiColumnComboBox1.MultiColumnComboBoxElement.MultiColumnPopupForm.MinimumSize = new Size(500, 500); }
Workaround: 1. Position the RadMultiColumnComboBox control and instead of setting the Dock property to Fill, anchor the it on all four sides. Alternatively: 2. Set the Dock property to Fill, but also set a MinimumSize of the column defining a height
When filtering is applied to RadMultiColumnComboBox editor in CellEditorInitialized event of RadGridView, the selected item is second one, if the new row is edited. Workaround: change the event handler by adding the following lines of code in the end of the RadGridView1_CellEditorInitialized: Dim value As Object = e.Row.Cells(e.ColumnIndex).Value If value Is Nothing Then editor.EditorControl.CurrentRow = Nothing Else editor.Value = e.Row.Cells(e.ColumnIndex).Value End If
The SelectedValueChanged event is not fired when you select the current row after filtering. Resolution: In Q1 2014 SP1 (2014.1.402) the first value from data source is selected by default and the event does not fire for already selected value. If you select second or other value and after that select the first row, the SelectedValueChanged and SelectedIndexChanged are fired.
1. Create a new project and add RadMultiColumnComboBox 2. Bind it and setup filtering 3. Attach to SelectedValueChanged and SelectedIndexChanged events 4. Run the project 5. Apply some filtering and you will see that these events will not fire, regardless that the current row has changed. Work around it by using the EditorControl.CurrentRowChanged event instead of SelectedValueChanged/SelectedIndexChanged events.
Currently there is not support for simple binding for this property.
This issue is inside the same application as in ticket #667438. There is a MultiColumnComboBox inside the editor form. There are two data sources. One containing the customer's "Rep" field and one for the list of dropdown items (list of Reps). How can the dropdown list be bound to the list of Reps but still display and update the Customer's Rep field? The attached video demonstrates the current behavior of the control.
To reproduce: -add RadMultiColumnComboBox and use the following code snippet: public partial class Form1 : Form { public Form1() { InitializeComponent(); List<Activity> list1 = new List<Activity>(); for (int i = 0; i < 5; i++) { if (i == 0) { list1.Add(new Activity() { Id = i, Name = "duplicated activity" }); } else { list1.Add(new Activity() { Id = i, Name = "Duplicated Activity" }); } } this.radMultiColumnComboBox1.DataSource = list1; this.radMultiColumnComboBox1.ValueMember = "Id"; this.radMultiColumnComboBox1.DisplayMember = "Name"; MultiColumnComboPopupForm popup = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.MultiColumnPopupForm; popup.EditorControl.MasterTemplate.CaseSensitive = true; this.radMultiColumnComboBox1.SelectedValue = 2; } public class Activity { public string Name { get; set; } public int Id { get; set; } } } Workaround: initialize the selected value in the Load event.
FIX. RadMultiColumnComboBox - when a row with null value is selected, instead of an empty string, the editor displays "Telerik.WinControls.UI.GridView"
To reproduce drop RadMultiColumnComboBox on a form and use the code below: public Form1() { InitializeComponent(); ThemeResolutionService.AllowAnimations = false; RadMultiColumnComboBoxElement multiColumnComboElement = this.combo1.MultiColumnComboBoxElement; multiColumnComboElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom; multiColumnComboElement.EditorControl.MasterTemplate.AutoGenerateColumns = false; multiColumnComboElement.EditorControl.AutoGenerateColumns = false; GridViewTextBoxColumn column1 = new GridViewTextBoxColumn("Item"); column1.HeaderText = "Item"; multiColumnComboElement.Columns.Add(column1); GridViewTextBoxColumn column2 = new GridViewTextBoxColumn("Description"); column2.HeaderText = "Description"; multiColumnComboElement.Columns.Add(column2); combo1.DisplayMember = "Description"; combo1.ValueMember = "Item"; this.combo1.AutoSizeDropDownToBestFit = true; this.combo1.DataSource = GetData(); FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = this.combo1.DisplayMember; filter.Operator = FilterOperator.StartsWith; this.combo1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); this.combo1.AutoFilter = true; this.combo1.MultiColumnComboBoxElement.AutoCompleteMode = AutoCompleteMode.Suggest; this.combo1.DropDownStyle = RadDropDownStyle.DropDown; this.combo1.SelectedItem = null; } private List<CustomItem> GetData() { List<CustomItem> items = new List<CustomItem>(); for (int i = 0; i < 20; i++) { CustomItem item = new CustomItem(i, String.Format("This is item number: {0}", i.ToString())); items.Add(item); } return items; } } [Serializable] public class CustomItem { public int Item { get; set; } public string Description { get; set; } public CustomItem(int pItem, string pDescription) { this.Item = pItem; this.Description = pDescription; } } Workaround: 1. Enable the animations ThemeResolutionService.AllowAnimations = true; or 2. Increase the popup size by one pixel when opening: void multiColumnComboElement_PopupOpening(object sender, CancelEventArgs e) { RadMultiColumnComboBoxElement multiColumnComboElement = (RadMultiColumnComboBoxElement)sender; multiColumnComboElement.MultiColumnPopupForm.Size = new Size(multiColumnComboElement.MultiColumnPopupForm.Size.Width + 1, multiColumnComboElement.MultiColumnPopupForm.Size.Height); } or 3. Turn off the control clipping ((RadHostItem)((MultiColumnComboPopupForm)multiColumnComboElement.MultiColumnPopupForm).SizingGripDockLayout.Children[1]).ClipControl = false;
To reproduce, add RadMultiColumnCombobox on a form and use the following code: public Form1() { InitializeComponent(); Random r = new Random(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("Name", typeof(string)); table.Columns.Add("Bool", typeof(bool)); table.Columns.Add("DateColumn", typeof(DateTime)); for (int i = 0; i < 10; i++) { table.Rows.Add(i, "Row " + i, r.Next(10) > 5 ? true : false, DateTime.Now.AddHours(i)); } radMultiColumnComboBox1.DataSource = table; radMultiColumnComboBox1.DisplayMember = "Name"; radMultiColumnComboBox1.AutoFilter = true; radMultiColumnComboBox1.DisplayMember = "Name"; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = radMultiColumnComboBox1.DisplayMember; filter.Operator = FilterOperator.Contains; radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); } Once the form loads up, select the text in the editable area and enter any number from 0 to 9. It is important the width of the MCCB is smaller than the width the columns take.
To reproduce: DataTable dt = new DataTable(); for (int i = 0; i < 10; i++) { dt.Columns.Add("Column " + i); } for (int i = 0; i < 1000; i++) { dt.Rows.Add(i); } this.radMultiColumnComboBox1.DataSource = dt; this.radMultiColumnComboBox1.DisplayMember = "Column 0"; this.radMultiColumnComboBox1.DropDownSizingMode = SizingMode.UpDown; this.radMultiColumnComboBox1.AutoSizeDropDownToBestFit = true; this.radMultiColumnComboBox1.EditorControl.LoadElementTree(); this.radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false; this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ShowPopup(); The columns are autosized but the popup is not sized correctly.
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)
Currently, in RadMultiColumnComboBox, if you AutoFilter by all columns and you type a value that resides in the ID column, while the DisplayMember is the Name, pressing the Enter after typing the ID will return the Name in the textbox part which may be confusing to the user. Such a case may be solved by introducing another textbox in the drop-down part just for filtering purposes.
Current item of RadMultiColumnComboBox is changed, when RadDock's document window position is changed.
When you select a row by pressing the left mouse button twice, you will select a wrong row if RadMultiColumnComboBox has filter applied.
When set the SelectedIndex property in the DropDownClosed event selected index is not set correctly. Workaround: private void radMultiColumnComboBox1_DropDownClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args) { this.radMultiColumnComboBox1.SelectedIndex = 0; this.radMultiColumnComboBox1.EditorControl.CurrentRowChanging += new CurrentRowChangingEventHandler(EditorControl_CurrentRowChanging); } void EditorControl_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e) { e.Cancel = true; this.radMultiColumnComboBox1.EditorControl.CurrentRowChanging -= EditorControl_CurrentRowChanging; }