System.Web.UI.WebControls.GridView.RowEditing Event

Occurs when a row's Edit button is clicked, but before the System.Web.UI.WebControls.GridView control enters edit mode.

Syntax

public event GridViewEditEventHandler RowEditing

Remarks

The GridView.RowEditing event is raised when a row's Edit button is clicked, but before the System.Web.UI.WebControls.GridView control enters edit mode. This enables you to provide an event-handling method that performs a custom routine, such as canceling the edit operation, whenever this event occurs.

A System.Web.UI.WebControls.GridViewEditEventArgs 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. To cancel the edit operation, set the System.ComponentModel.CancelEventArgs.Cancel property of the System.Web.UI.WebControls.GridViewEditEventArgs object to true.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0