Getting the new value in gridview rowupdating event
To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source. Last Change: More Information (@jwiscarson) I’m sorry, I was in hurry. In that project, the users could select 2 categories, enter a search string and the result will show in a Grid View. Here is my problem, if the "admin user" click on edit, change the value of the cell and execute the update, the value would not changed in the Hoo boy.You didn't ask this in your question, but you've written some smelly code here.Is Bound Using Data Source ID; Grid View Update Event Handler handler1 = (Grid View Update Event Handler) base.
I have a Grid View control and use old style manual binding with a Data Source property and invoke the Data Bind() method.
After searching long and hard I found a great article that solved my issue.
Take a look at the page load if you are binding on post back then the values get updated before you are able to access them.
Data Bind() End With End Sub Private Sub gv Test_Row Editing(By Val sender As Object, By Val e As System.
On Row Updating I can now retrieve new values using "New Values" property for each field I need, then cancel updating and use new values for my purposes (here, build a string to use in a sp to insert a new record based on new values): Protected Sub gv Autorizzazioni_Row Updating(By Val sender As Object, By Val e As System.