To reproduce: Add a RadMultiColumnComboBox and add a DateTime column. Add a filter descriptor for the column and set the autofilter property to true. Type in the textbox and you will see abnormal behavior. Workaround: public class DTConverter : TypeConverter { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { DateTime dt; if (DateTime.TryParse(value.ToString(), out dt)) { return dt; } return DateTime.MinValue; } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string) || sourceType == typeof(DateTime)) { return true; } return base.CanConvertFrom(context, sourceType); } } (this.multiColumnComboBox.MultiColumnComboBoxElement.Columns["SaleDate"] as GridViewDateTimeColumn).FilteringMode = GridViewTimeFilteringMode.Date; (this.multiColumnComboBox.MultiColumnComboBoxElement.Columns["SaleDate"] as GridViewDateTimeColumn).DataTypeConverter = new DTConverter(); Telerik.WinControls.Data.FilterDescriptor oFilter = new Telerik.WinControls.Data.FilterDescriptor(); oFilter.PropertyName = this.multiColumnComboBox.DisplayMember; oFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsGreaterThanOrEqualTo; this.multiColumnComboBox.EditorControl.MasterTemplate.FilterDescriptors.Add(oFilter);
To reproduce: - add custom RadMultiColumnComboBox as follows: class MyRadMultiColumnCombobox : RadMultiColumnComboBox { protected override void OnLoad(System.Drawing.Size desiredSize) { base.OnLoad(desiredSize); this.AutoSizeDropDownToBestFit = true; this.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = this.DisplayMember; filter.Operator = FilterOperator.Contains; this.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); } public override string ThemeClassName { get { return typeof(RadMultiColumnComboBox).FullName; } } } - fill it with data: 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 = 10; i < 100; i++) { table.Rows.Add(i, "Row " + i, r.Next(10) > 5 ? true : false, DateTime.Now.AddHours(i)); } myRadMultiColumnCombobox1.DataSource = table; myRadMultiColumnCombobox1.DisplayMember = "Name"; - add a RadTextBox and change its text when SelectedIndexChanged event fires: private void myRadMultiColumnCombobox1_SelectedIndexChanged(object sender, EventArgs e) { radTextBoxControl1.Text = myRadMultiColumnCombobox1.SelectedValue.ToString(); } Steps: 1.Type Backspace 2.Type 5 3.Click on the displayed row 'Row 15' will display in the Text Box 4.Type Backspace 5.Type 0 6.Click on the displayed row 'Row 10' should be displayed in the Text Box, but the SelectedIndexChanged event is not fired, so 'Row 15' is still displayed in the text box even though the MultiColumnComboBox appears to have now selected Row 10. Workaround: use myRadMultiColumnCombobox1.MultiColumnComboBoxElement.MultiColumnPopupForm.EditorControl.CurrentRowChanged event instead
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.
To reproduce: -add RadMultiColumnComboBox and bind it to some collection. Use the following code: radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.ShowItemToolTips = true; radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.ToolTipTextNeeded += EditorControl_ToolTipTextNeeded; private void EditorControl_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e) { e.ToolTipText ="some text"; } As a result the tool tip is not shown. Workaround:use ScreenTipNeeded event instead
To reproduce: Create a create a class with Properties Id, Name, ParentId this.multiColumnComboBox.MultiColumnComboBoxElement .EditorControl.Relations.AddSelfReference(this.multiColumnComboBox.MultiColumnComboBoxElement.EditorControl.MasterTemplate, "Id", "ParentId"); this.multiColumnComboBox.DataSource = this.people; this.multiColumnComboBox.DisplayMember = "Name"; this.multiColumnComboBox.ValueMember = "Id"; this.multiColumnComboBox.AutoFilter = true; this.multiColumnComboBox.DisplayMember = "Name"; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = this.multiColumnComboBox.DisplayMember; filter.Operator = FilterOperator.Contains; this.multiColumnComboBox.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); When you open the popup exception should occur.
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); } } }
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;
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.
If one is using the AutoFilter functionality and want's to select the very first row of the filtered grid, s\he is not able to do so by the keyboard. Resolution: Selection of first row with keyboard is introduced in our KB article Use custom filtering to search in all columns of RadMultiColumnComboBox. Please take a look at the following link http://www.telerik.com/support/kb/winforms/details/use-custom-filtering-to-search-in-radmulticolumncombobox
To reproduce: public partial class Form1 : Form { public Form1() { InitializeComponent(); Random r = new Random(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("Name", typeof(string)); for (int i = 0; i < 10; i++) { table.Rows.Add(i, "Row with longer value " + i); } radMultiColumnComboBox1.DropDownOpening += radMultiColumnComboBox1_DropDownOpening; radMultiColumnComboBox1.AutoSizeDropDownToBestFit = true; radMultiColumnComboBox1.DataSource = table; } void radMultiColumnComboBox1_DropDownOpening(object sender, CancelEventArgs args) { // radMultiColumnComboBox1.BestFitColumns(); } private void button1_Click(object sender, EventArgs e) { Random r = new Random(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("Name", typeof(string)); for (int i = 0; i < 10; i++) { table.Rows.Add(i, "Row " + i); } radMultiColumnComboBox1.DataSource = table; } } WORKAROUND: call the BestFitColumns method in the DropDownOpening event
Workaround: disable the animations this.radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false;
1. Create a new project with RadGridView and bind it. 2. Add GridViewMultiComboBoxColumn. 3. Set its DataSource to a large data set. 4. Run the project and try to show the drop down.
Currently you can filter in RadMultiColumnComboBox only by setting the AutoFilter property. Resolution: You can use the CompositeFilterDescriptors in RadMultiColumnComboBox and filter two or more columns. Please take a look at the code snippet: this.radMultiColumnComboBox1.DisplayMember = "City"; this.radMultiColumnComboBox1.AutoFilter = true; FilterDescriptor descriptor = new FilterDescriptor(this.radMultiColumnComboBox1.DisplayMember, FilterOperator.StartsWith, "Lo"); //first column FilterDescriptor descriptor2 = new FilterDescriptor("ContactName", FilterOperator.StartsWith, "Pe"); //second columns CompositeFilterDescriptor compositeFilter = new CompositeFilterDescriptor(); compositeFilter.FilterDescriptors.Add(descriptor); compositeFilter.FilterDescriptors.Add(descriptor2); compositeFilter.LogicalOperator = FilterLogicalOperator.Or; //OR between these columns this.radMultiColumnComboBox1.EditorControl.FilterDescriptors.Add(compositeFilter);
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.
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;
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
Currently RadMultiColumnComboBox closes immediately when clicking on a checkbox cell and does not allow changing its value.
Currently it is not possible to select multiple rows in RadMultiColumnComboBox.
RadMultiColumnComboBox disabled state in control default is inconsistent with RadDropDownList theme.
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.