System.Web.UI.WebControls.GridViewEditEventArgs Class

Provides data for the GridView.RowEditing event.

See Also: GridViewEditEventArgs Members


public class GridViewEditEventArgs : System.ComponentModel.CancelEventArgs


The System.Web.UI.WebControls.GridView control raises the GridView.RowEditing event when an Edit button (a button with its CommandName property set to "Edit") is clicked, but before the System.Web.UI.WebControls.GridView control enters edit mode. This allows 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 allows you to determine the index of the row being edited 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.

For a list of initial property values for an instance of System.Web.UI.WebControls.GridViewEditEventArgs, see the GridViewEditEventArgs.#ctor(int) constructor.


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