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);
TextChanged event of RadMultiColumnComboBox is not fired on many occasions.
1. Create a project with RadGridView 2. Add a GridViewMultiComboBoxColumn 3. Attach to CellEditorInitialized event and try to handle PopupOpened event to change the popup size.
1. Create a new project with RadMultiColumnComboBox 2. Add rows in unbound mode 3. On a timer clear the Rows collection and insert new rows 4. Run the application and open and close the drop down several times
Using my two screenshots and values, note: 1. Using Keyboard: I have 'A' selected and type a single 'W' to change my selection and hit enter. The next drop-down will still display at the width you see for the original A selection. It will not be until the next drop-down that it resizes correctly. 2. Using Mouse: I have 'A' selected and select the 'WWWW...." from the drop-down with my mouse. The drop-down will appear correctly the next time.
Currently RadMultiColumnComboBox uses exact comparison and it is not possible to change this behavior.
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: 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: radMultiColumnComboBox1.DropDownOpening += new RadPopupOpeningEventHandler(radMultiColumnComboBox1_DropDownOpening); .... void radMultiColumnComboBox1_DropDownOpening(object sender, CancelEventArgs args) { int width = 0; foreach (GridViewDataColumn col in radMultiColumnComboBox1.EditorControl.Columns) { width += col.Width; } radMultiColumnComboBox1.MultiColumnComboBoxElement.MultiColumnPopupForm.MinimumSize = new Size(width, 0); }
ADD. RadMultiColumnComboBox - add ability to display focus cues when DropDownStyle = DropDownList
To reproduce: use the following code: private void Form1_Load(object sender, EventArgs e) { this.productsTableAdapter.Fill(this.nwindDataSet.Products); this.radMultiColumnComboBox1.DataSource = this.productsBindingSource; this.radMultiColumnComboBox1.DisplayMember = "ProductName"; this.radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false; } Follow the steps: 1.Click the arrow button. 2.Scroll to the bottom via the Mouse Wheel As a result the last 3 rows are missing. 3.Scroll to the top via the Mouse Wheel. 4.Scroll to the bottom via the Mouse Wheel As a result the 3 missing rows are now visible. Workaround: this.radMultiColumnComboBox1.MultiColumnComboBoxElement.PopupOpened+=MultiColumnComboBoxElement_PopupOpened; private void MultiColumnComboBoxElement_PopupOpened(object sender, EventArgs e) { this.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.TableElement.VScrollBar.Value = this.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.TableElement.VScrollBar.Maximum; }
To reproduce: 1. Open the Telerik Examples application (Quick Start Framework) 2. Go to the MultiColumnComboBox example 3. Enter partial text into the box 4. Click on title to lose focus. You will see that the text will be not cleared. When use Tab key, the text will be cleared.
To reproduce: Add a RadMultiColumnComboBox fill it with data and set the following settings: comboBoxColumnElement.EditorControl.AutoSizeRows = true; comboBoxColumnElement.EditorControl.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; comboBoxColumnElement.EditorControl.MasterTemplate.AutoGenerateColumns = false; comboBoxColumnElement.EditorControl.ShowRowHeaderColumn = false; comboBoxColumnElement.EditorControl.ShowFilteringRow = false; comboBoxColumnElement.AutoSize = true; comboBoxColumnElement.AutoFilter = true; comboBoxColumnElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize; comboBoxColumnElement.AutoSizeDropDownToBestFit = true; comboBoxColumnElement.DropDownMinSize = new Size(420, 150); comboBoxColumnElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom; When you open the dropdown you will notice that one time the scrollbar will be on the bottom and the next time it will be on the top and so on. Workaround: comboBoxColumnElement.PopupOpened += Popup_Opened;.... Timer timer = new Timer(); private void Popup_Opened(object sender, EventArgs e) { timer.Tick += Tick; timer.Interval = 20; timer.Start(); } private void Tick(object sender, EventArgs e) { comboBoxColumnElement.EditorControl.TableElement.ScrollToRow(comboBoxColumnElement.EditorControl.SelectedRows(0)); timer.Stop(); }
To reproduce: Add a RadMultiColumnComboBox with one row. Open and close the dropdown, you will see that the scrollbars will show and hide with every openning Workaround: Use the following class: public class MCCB : RadMultiColumnComboBox { protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement() { return new MCCBElement(); } } public class MCCBElement : RadMultiColumnComboBoxElement { protected override Size GetPopupSize(RadPopupControlBase popup, bool measure) { Size baseSize = base.GetPopupSize(popup, measure); RadScrollBarElement hScrollBarElement = this.EditorControl.TableElement.HScrollBar; baseSize.Height += (int)hScrollBarElement.ControlBoundingRectangle.Size.Height; return baseSize; } protected override Type ThemeEffectiveType { get { return typeof(RadMultiColumnComboBoxElement); } } }
To reproduce: 1. Add a RadMultiColumnComboBox and set up filtering. 2. Start typing in order to filter all the rows. 3. Click somewhere. As a result the RadMultiColumnComboBox will loose focus. If you try to get the SelectedIndex or SelectedValue you will notice that the first row in the popup grid is current. It is expected to have no selected row as the entered text does not match any row. Workaround: public class CustomRadMultiColumnComboBox : RadMultiColumnComboBox { protected override void OnLostFocus(EventArgs e) { int currentIndex = this.SelectedIndex; base.OnLostFocus(e); this.SelectedIndex = currentIndex; } public override string ThemeClassName { get { return typeof(RadMultiColumnComboBox).FullName; } } }
To reproduce: - Add bound MCCB to a form. - Open the form at design time. - Add a control to the form and resize it. - Start the application and and then close the form. - You will get the following error "The designer loader did not provide a root component but has not indicated why".
To reproduice: 1. Add mccb and bind it: Random random = new Random(); DataTable dataTable = new DataTable(); dataTable.Columns.Add("ID", typeof(int)); dataTable.Columns.Add("Name", typeof(string)); dataTable.Columns.Add("Bool", typeof(bool)); dataTable.Columns.Add("DateColumn", typeof(DateTime)); for (int i = 0; i < 20; i++) { dataTable.Rows.Add(i, "Row " + i, random.Next(10) > 5 ? true : false, DateTime.Now.AddDays(i)); } this.radMultiColumnComboBox1.DataSource = dataTable; this.radMultiColumnComboBox1.DisplayMember = "Name"; this.radMultiColumnComboBox1.ValueMember = "Name"; 2. Add filter and subscribe to the event: radMultiColumnComboBox1.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor(); filter.PropertyName = "Name"; filter.Operator = FilterOperator.Contains; this.radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); radMultiColumnComboBox1.SelectedIndexChanged += radMultiColumnComboBox1_SelectedIndexChanged; void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e) { Console.WriteLine(string.Format("Row changed, current Name = {0}", radMultiColumnComboBox1.EditorControl.Rows[radMultiColumnComboBox1.SelectedIndex].Cells["Name"].Value)); } 3. Start the app the selected row is "Row 0". Type in "2", the popup will open showing rows "Row 2" and "Row 12". At this point, pressing Esc or moving the focus away from the control selected Row 2, while it shouldn't.
To reproduce: - Bind the control to a binding list. - Add and then remove items at runtime. Workaround: radMultiColumnComboBox1.EditorControl.BeginUpdate(); list.RemoveAt(0); radMultiColumnComboBox1.EditorControl.EndUpdate();
To reproduce: - Ty some text so the items in the drop down are filtered. - Directly press enter (this should select the first item in the drop down) - The selected value is updated however the text is not. Workaround: Private Sub cbo_SelectedValueChanged(sender As Object, e As EventArgs) Handles RadMultiColumnComboBox1.SelectedValueChanged, RadMultiColumnComboBox2.SelectedValueChanged, RadMultiColumnComboBox3.SelectedValueChanged Dim cbo As RadMultiColumnComboBox = sender If bLoading = False AndAlso cbo.Text <> CType(cbo.SelectedItem, Telerik.WinControls.UI.GridViewDataRowInfo).Cells(cbo.DisplayMember).Value Then cbo.Text = CType(cbo.SelectedItem, Telerik.WinControls.UI.GridViewDataRowInfo).Cells(cbo.DisplayMember).Value End If End Sub
To reproduce: - The attached video shows how you can reproduce the issue Note - you should type fast in the drop down and the size is invalid only the firs time. Workaround: RadMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = False