System.Web.UI.WebControls Namespace GridView Class
.NET Framework version 2.0
Occurs when a Cancel button of a row in edit mode is clicked, but before the row exits edit mode.
[ VB ]
Public Event RowCancelingEdit As GridViewCancelEditEventHandler
[ C# ]
public event GridViewCancelEditEventHandler RowCancelingEdit;
[ C++ ]
public: __event GridViewCancelEditEventHandler* RowCancelingEdit;
In [ JScript ], you can handle the events defined by a class, but you cannot define your own.
The RowCancelingEdit event is raised whenever a Cancel button associated with a row in edit mode in the GridView control is clicked, but before the GridView exits edit mode.
This allows 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.
Information related to the RowCancelingEdit event is passed via a GridViewCancelEditEventArgs object to the method assigned to handle the event. The following GridViewCancelEditEventArgs properties provide information specific to this event.
Property |
Description |
Cancel |
Gets or sets a value indicating whether the event should be canceled ( inherited from CancelEventArgs ) |
RowIndex |
Gets the index of the row containing the Cancel button that raised the event. |
GridView Members Allowing Users to Edit Rows in a GridView Control