Occurs when a row's Delete button is clicked, but before the System.Web.UI.WebControls.GridView control deletes the row.
The GridView.RowDeleting event is raised when a row's Delete button is clicked, but before the System.Web.UI.WebControls.GridView control deletes the row. This enables you to provide an event-handling method that performs a custom routine, such as canceling the delete operation, whenever this event occurs.
A System.Web.UI.WebControls.GridViewDeleteEventArgs object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the delete operation should be canceled. To cancel the delete operation, set the System.ComponentModel.CancelEventArgs.Cancel property of the System.Web.UI.WebControls.GridViewDeleteEventArgs object to true. You can also manipulate the GridViewDeleteEventArgs.Keys and GridViewDeleteEventArgs.Values collections, if necessary, before the values are passed to the data source.
For more information about handling events, see Consuming Events.