Completed
Last Updated: 10 Jan 2017 13:50 by ADMIN
ADMIN
Dimitar
Created on: 08 Dec 2016 08:34
Category: VirtualGrid
Type: Bug Report
1
FIX. RadVirtualGrid - the KeyDown and KeyUp events are not forwarded to VirtualGridTextBoxControlEditor
To reproduce:
private void RadVirtualGrid1_EditorRequired(object sender, Telerik.WinControls.UI.VirtualGridEditorRequiredEventArgs e)
{
    switch (e.ColumnIndex)
    {
        case 1:
            {
                VirtualGridTextBoxControlEditor editor = new VirtualGridTextBoxControlEditor();
                editor.CharacterCasing = CharacterCasing.Upper;
                e.Editor = editor;
            }
            break;
    }
}

- Open the editor and try using the backspace or the arrow keys. 

Workaround:
class MyGrid : RadVirtualGrid
{
    protected override void OnKeyDown(KeyEventArgs e)
    {
        base.OnKeyDown(e);

        if (this.ActiveEditor is VirtualGridTextBoxControlEditor)
        {
            var editor = this.ActiveEditor as VirtualGridTextBoxControlEditor;
            var element =   editor.EditorElement as RadTextBoxControlElement;
            element.InputHandler.ProcessKeyDown(e);
        }
    }
    protected override void OnKeyUp(KeyEventArgs e)
    {
        base.OnKeyUp(e);

        if (this.ActiveEditor is VirtualGridTextBoxControlEditor)
        {
            var editor = this.ActiveEditor as VirtualGridTextBoxControlEditor;
            var element = editor.EditorElement as RadTextBoxControlElement;
            element.InputHandler.ProcessKeyUp(e);
        }
    }
}
0 comments