update gridview problem using object datasource

Discussion in 'ASP .Net' started by Paul, Jun 30, 2008.

  1. Paul

    Paul Guest

    Hi I have a gridview that binds to an object datasource. I added an update
    method to the object data source through the wizard. The update method takes
    an object as input and returns an object of the same type. Anyhow it looks
    like the code is trying to run the update method when the user selects the
    update button (command field button on the grid). It does not work since the
    object is not passed in. I am guessing I would need to populate the object
    in the RowUpdating event and then pass the object to the method. Not quite
    sure how to pass the object to the update method or if I use the update
    parameters like ObjDtaSceDiscrepancies.UpdateParameters["IsNew"].DefaultValue
    = "false";.
    IsNew is one of the parameters of the object being passed to the update
    method.
    I tried this but got the runtime error object not set to an instance of an
    object.

    thanks.
    --
    Paul G
    Software engineer.
     
    Paul, Jun 30, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hartmut Schroth
    Replies:
    3
    Views:
    3,539
    Hartmut Schroth
    Dec 1, 2003
  2. Mike Grace
    Replies:
    1
    Views:
    1,946
    Brock Allen
    May 12, 2006
  3. =?Utf-8?B?TGFycnkgQ2hhcmx0b24=?=

    N-Tier Object datasource and Gridview

    =?Utf-8?B?TGFycnkgQ2hhcmx0b24=?=, May 22, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    564
  4. Tarren
    Replies:
    0
    Views:
    367
    Tarren
    Oct 5, 2006
  5. jobs
    Replies:
    2
    Views:
    1,713
Loading...

Share This Page