Rowupdating command in gridview dating events from the birth of christ
Yes it is IF NOT Is Post Back, HAHAHAHA I am a more familier with VB ..missed to read that '!I am using asp command field type button for editing gridview row.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.I have set the requisite attributes in the Grid View tag. Within the Item Template I have an Image Buttong with a Command Name of "Edit".This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.Then in the row editing event set the control to active.This would keep the user from clicking the button twice.
Bad thing is that the sql table updates each time button is clicked. Here is code I am using Markup of command field inside Grid View1: Disable the update link button at the end of the row updating event.
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.
When I hit Update, the changes are not saved, and there is no error message. When I hit Update, the changes are not saved, and there is no error message. 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).
(Note, in the gridview the One strange thing that I've noticed that makes me think it's a View State problem is that if I change the Command Name of the Update button to "Edit" that postback event does get captured in the Row Command event...
So I am having an issue with doing an update in a Gridview during an On Row Updating event.