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.
event is raised when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode.You need to include the Grid View Command Field column to add Edit, Update and Cancel Buttons in the Grid View. You need to include Template Field for every column you want to provide Editing because Template Field provides you both Item Template and Edit Item Template to create interface for two separate Grid View modes. You need to handle Grid View events such as Row Editing, Row Canceling Edit and Row Updating to provide desired editing functionality.Font-Names="Verdana" Font-Size="10" Data Key Names="Product ID" Auto Generate Columns="false" onrowcancelingedit="Grid View1_Row Canceling Edit" onrowediting="Grid View1_Row Editing" onrowupdating="Grid View1_Row Updating"In the above code, I set two properties Show Edit Button and Show Cancel Button of Command Field.This enables you to provide an event-handling method that performs a custom routine, such as stopping the cancel operation if it would put the row in an undesired state, whenever this event occurs.A Grid View Cancel Edit Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the cancel operation should be stopped.