Completed
Last Updated: 19 Jun 2017 12:09 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 24 Feb 2017 06:34
Category: MultiColumnCombo
Type: Bug Report
0
FIX. RadMultiColumnComboBox - FilterExpressionException when entering numeric field in the editable part
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;
    }
}
0 comments