Click original Data Table = CType(View State("original Values Data Table"), System. Data Table) For Each r As Grid View Row In Grid View1.
I put a breakpoint on the Row Updating event handler and found that the event is not fired. I put a breakpoint on the Row Updating event handler and found that the event is not fired. 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.
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.
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.
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.
protected void Tests To Be Done_Row Updating(object sender, Grid View Edit Event Args e) Sql Command command Z = new Sql Command(query, my Connection); command Z. Close(); Set Patient Test Grid(Session["PATID"], e); } At my first try I had a On Row Command with the Grid View Command Event Args at the code behind.
But it still throws the same exception, although I've read on a couple of sites that changing it to On Row Editing and Grid View Edit Event Args would solve the problem.
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.