Commandargument row updating

Do you see anything that might be preventing the new value from being accessed?I removed the code in the row updating method just to show all the working code that fires when the update occurs.when I click on the edit link, the gridview goes into the edit mode, I update the value in the textbox for the description field and then click the update link. I know I'm doing something wrong, I just can't figure out what. Below is my Row Updating method This sounds more like a task for the Grid View Update Event Args to me.I'm still relatively new to and still learning my way around. Depending on whether your data is correctly bound (I can't judge from here, but from what I see you should be fine) you should be able to use: e. Old Values // for the old values Both are Dictionary objects containing name/value pairs of the bound columns that are being updated, making it easier to send them to the DAO layer, something like: and the new value is not present.The way im populating the datagrid is putting it into a data Set and using that as the data Source and doing a databind. I'm trying to use the on Row Updating event to update a gridview. Your txt Description is inside the Grid View, which is why it is not accessible. As you can see I'm trying to manually update a field in my database with the value of (originalvalue) 1 when the user clicks the buttonfield of the corresponding row.

A Grid View Updated Event Args object is passed to the event-handling method, which enables you to determine the number of rows affected and any exceptions that might have occurred.

The Command Argument property complements the Command Name property by allowing you to provide any additional information for the command to perform.

What im trying to accomplish is to try to edit a gridview by using the updating event but not sure how to do this.

Basically, it doesn't work and I don't get it.

The Row Updated event is raised when a row's Update button is clicked, but after the Grid View control updates the row.

Leave a Reply