Completed
Last Updated: 31 Mar 2014 10:15 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 19 Nov 2013 11:02
Category: MultiColumnCombo
Type: Bug Report
3
FIX. RadMultiColumnComboBox with AutoFilter=true does not always fire the SelectedIndexChanged event
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
0 comments