CellEndEdit - delete row

3 posts, 0 answers
  1. Mercell
    Mercell avatar
    33 posts
    Member since:
    Nov 2006

    Posted 05 Dec 2011 Link to this post


    If I try to delete a row in the CellEndEdit event I get an "Object reference not set to an instance of an object." exception.

    I tried using row.Delete() and removing the item from the underlying datasource but both generates the same error.

    Using: 2010.3.10.1215

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
       at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
       at Telerik.WinControls.UI.GridRowBehavior.ProcessEnterKey(KeyEventArgs keys)
       at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
       at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
       at Telerik.WinControls.UI.BaseGridBehavior.ProcessKeyDown(KeyEventArgs keys)
       at Telerik.WinControls.UI.BaseGridEditor.OnKeyDown(KeyEventArgs keyEventArgs)
       at Telerik.WinControls.UI.RadTextBoxEditor.OnKeyDown(KeyEventArgs e)
       at Telerik.WinControls.UI.RadTextBoxEditor.TextBoxItem_KeyDown(Object sender, KeyEventArgs e)
       at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
       at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
       at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
       at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
       at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
       at System.Windows.Forms.TextBox.WndProc(Message& m)
       at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    How do I solve this?

  2. Srinivas
    Srinivas avatar
    5 posts
    Member since:
    Dec 2011

    Posted 07 Dec 2011 Link to this post

    i am also searching for same solution
  3. Jack
    Jack avatar
    2333 posts

    Posted 08 Dec 2011 Link to this post

    Hi guys,

    I tested the described scenario using our latest release - Q3 2011. I have not observed issues when executing the following code in CellEndEdit event:
    void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)

    Could you please open new support tickets and us your applications? This will allow us to investigate this issue further. Thank you for your cooperation.

    I am looking forward to your reply.
    All the best,
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

Back to Top