Gridview rowupdating cancel

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.

gridview rowupdating cancel-81gridview rowupdating cancel-54

When the user clicks the Update link button the grid's Row Command Event fires.

event is raised when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode.

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 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 edit operation should be canceled.

I am using a Template Field to display my Edit, Update and Cancel 'buttons' in the first column of the Grid View within respective Item Template and Edit Item Template fields.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “gridview rowupdating cancel”