If you are using command buttons, then do not use Auto Generate Edit Button.
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.
I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update.
I'm having recurring problems with VS 2015 where my code behind pages seem to lose their relationship with their associated aspx page. Here's an example: In this example, the cs file gives me the following error on lbl ID.The only way I've found to deal with this so far is to trash the entire solution file, create a new one, copy the old code into it, and start over. Text in the Sql Data Reader: The name 'lbl ID' does not exist in the current context. If I trash my solution file, and create a brand new one, it will work. Yes, I did put the breakpoint at the Row Updating line (and not in the function).You have to make sure that you aren't setting your Grid View's data when it is not postback.event is raised when a row's Update button is clicked, but before the Grid View control updates the row.
This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.
If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.
I'm having a very hard time understand what would prevent your event from being fired.
This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.
After it has been clicked the postback places that row in edit mode. At this point in time the above Edit Item Template is displayed with two Image Buttons within it. My problem lies in that the click on the Update Image Button posts back, but neither the Row Command nor Row Updating events get triggered.
NET Forum so that other people can learn from the experience too. -Frinny You may need to turn off validation even if you are not validating anything.