Rowupdating is not
Right now, I have not written code for the Update event. Right now, I have not written code for the Update event. Then the page posts back, the text boxes go back to being labels and the new values are lost, and the Row Updating code never fires. Yes, I did put the breakpoint at the Row Updating line (and not in the function). If you bind your data to the Grid View in the page load event, then you lose any data that the user provided.If you bind the data in the Pre Render event, then it will bind after all of the page events have finished so you won't lose anything.Dim cust Adapter As Sql Data Adapter = New Sql Data Adapter( _ "SELECT Customer ID, Company Name FROM Customers", connection) ' Add handlers. Row Updating, New Sql Row Updating Event Handler( _ Address Of On Row Updating) Add Handler cust Adapter. Row Updating, _ New Sql Row Updating Event Handler(Address Of On Row Updating) Remove Handler cust Adapter.
On Row Deleting - can call registered event handlers" I couldnt figure out how to continue this thread, but the issues in it are related so i'm including it as a reference.
If the values are alternated in the hashtable they are applied to the grid and carried over to the data source as well.
This code works fine in the first page of grid view, but when I try to edit the 2nd page it does not work.
When I click on edit button the corresponding row edit template is loading.
When I click save instead of saving to second page the first page row gets modified.