update gridview problem using object datasource

P

Paul

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top