Rowupdating command

A Grid View Command Event Args object is passed to the event-handling method, which enables you to determine the command name and command argument of the button clicked.event returns this output: event args: (command=System. Sql Command command Type=2 status=0) The Row Updated event returns this output: event args: (command=System. Sql Command command Type=2 records Affected=1 row=System. (Note, in the gridview the Enable View State="False" - if I set it to True I get the standard "Failed to load viewstate. error) 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... I am using asp command field type button for editing gridview row.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.

I have set the requisite attributes in the Grid View tag.

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.

One has it's Command Name = "Update" and the other "Cancel".

Raises the Page Index Changing and Page Index Changed events.

event is raised when a button listed in the previous table is clicked, it is recommended that you use the events listed in the table for the operation.