Asp net gridview rowupdating newvalues

It seems that its not getting the oldvalues and returns a null, which is something strange. If you are not using a 'standard' datasource New/Old Values are not always available in the Row Updating event.

I would greatly appreciate for any help or suggested ideas/approach in order to accomplish this task, or any sample codes snippet. Null Reference Exception: Object reference not set to an instance of an object...".

If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.

It looks as though you can't use keys if you are using templates fields or if you are not using the built in data controls.

I haven't had time to verify this but that seemed to be the case from reading this.

I have the following code below in my Grid View1_Row Updating event. Maybe after midnight today, or sometime this weekend. When I go to configure the datasource for my Object Data Source, on my first screen where I designate the business object, my dropdownlist is blank. Turns out getting the DAL, BLL, and the Object Data Souce in place, did the trick. Tracing the code, using both methods above, the value of the textbox is not being passed back; it doesn't appear in the newvalues either.

That probably needs to be linked into the Object Data Source along my Get Products, as well as the Add Products, and Delete Product methods. Problem is, I don't have the time at the moment yet. And back to my original question, how to I get the new value? I have a gridview, go into edit mode, enter a value in a textbox, then click update.

Leave a Reply