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
1185
Error when saving data - objectDataSource
posted

I have a working WebDataGrid - it displays my data, and seems to update in on screen. However when I hit Save, or atttempt to insert a record, I get the following Javascript error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Clicking thorugh this take me back to my page, but the changes have NOT been persisted.

If I select anything which takes me off that page, I get the following error:

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.      

Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
   Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) +673
   Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +202
   Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() +73
   Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() +34
   System.Web.UI.Page.RaiseChangedEvents() +165
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485

This is holding up development since not being able to test basic edit/save functions is kinda important. My object data source is straighforward:

<asp:ObjectDataSource ID="dsClinics" runat="server"  
        DataObjectTypeName="Psoriasis.Clinic" DeleteMethod="Delete"
        InsertMethod="Update" SelectMethod="GetAllClinics"
        TypeName="Psoriasis.ClinicsManager" UpdateMethod="Update">
    </asp:ObjectDataSource>

The Update/Delete/Insert methods all take an object of type Clinic as declared. The methods are all static, and this arrangement works with normal Edit templates.

I am using the latest version: 2009.2.2056