Occurs when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode.
Assembly: System.Web (in System.Web.dll)
Theevent 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 GridViewCancelEditEventArgs 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. To stop the cancel operation, set the Cancel property of the GridViewCancelEditEventArgs object to true.
For more information about handling events, see NIB: Consuming Events.
The following example demonstrates how to use the GridView control.event to display a cancellation message when the user cancels the update operation of a
The following example demonstrates how to use theevent to cancel the update operation when the data source is set programmatically.
Available since 2.0