Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
PostBack causes Null reference error
posted

If I add a row on the client side, I can see the new row appear in my grid and I am able to make changes to the values.  When I click any button that posts back to the page, I receive this null reference error:

[NullReferenceException: Object reference not set to an instance of an object.]

   Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag) +16778

   Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag) +90

   Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) +2187

   Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +340

   Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() +108

   Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() +67

   System.Web.UI.Page.RaiseChangedEvents() +89

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2777

 

On the grid I have ViewState disabled and on the Editing Core I have BathUpdating enabled.  What is causing this null reference?

  • 205
    posted

    Here is a sample I have created for you to reproduce the error.  Thank you for your help.

    WebGridTest.zip
  • 10240
    posted

    Hi bhughes1,

    Following on David's message, if you can post a sample I will be happy to look further into this issue for you.

     

  • 33839
    posted

    Hi bhughes1,

    I know the part of the code where that is happening, but I have no clue what exactly is null without debugging through it.  Do you think you could post a sample replicating the problem?  What happens if you have on ViewState?

    regards,
    David Young