Completed
Last Updated: 08 Feb 2016 15:02 by ADMIN
ADMIN
Dimitar
Created on: 01 Dec 2015 11:47
Category: GridView
Type: Bug Report
1
FIX. RadGridView - exception when the grid is inside split panel which is re-sized when the grid is in edit mode.
To reproduce:
- Add a grid to a split panel.
- Edit a cell and resize the panel without ending the edit.
- Click back in the same cell.

Workaround:
private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    BaseGridEditor editor = e.ActiveEditor as BaseGridEditor;
    var element = editor.EditorElement as RadTextBoxEditorElement;
    if (element != null)
    {
        element.TextBoxItem.HostedControl.LostFocus -= HostedControl_LostFocus;
        element.TextBoxItem.HostedControl.LostFocus += HostedControl_LostFocus;
    }
}

private void HostedControl_LostFocus(object sender, EventArgs e)
{
    this.RadGridView1.EndEdit();
}
0 comments