update gridview problem using object datasource

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGF1bA==?=

    update gridview problem using object datasource

    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 ObjDtaSceDiscre pancies.UpdateP arameters["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.
Working...