Unplanned
Last Updated: 05 Apr 2016 12:35 by ADMIN
ADMIN
Hristo
Created on: 29 Mar 2016 14:37
Category: GridView
Type: Bug Report
0
FIX. RadGridView - popup of MCCB with is not filtered if the column has an AutoCompleteMode.SuggestAppend and the text in the input matches the first item in the drop-down
Workaround: use custom editor element

private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
    if (e.EditorType == typeof(RadMultiColumnComboBoxElement))
    {
        e.EditorType = typeof(MyRadMultiColumnComboBoxElement);
    }
}

public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadMultiColumnComboBoxElement);
        }
    }

    protected override void ProcessKeyDown(object sender, KeyEventArgs e)
    {
        base.ProcessKeyDown(sender, e);

        FieldInfo fi = this.GetType().BaseType.BaseType.GetField("oldTextValue", BindingFlags.Instance | BindingFlags.NonPublic);
        fi.SetValue(this, this.textBox.Text.Substring(0, this.textBox.SelectionStart));
    }
}
0 comments