System.Web.UI.WebControls Namespace GridView Class
.NET Framework version 2.0
Occurs when an Edit command button within a GridView control is clicked, but before the edit operation.
[ VB ]
Public Event RowEditing As GridViewEditEventHandler
[ C# ]
public event GridViewEditEventHandler RowEditing;
[ C++ ]
public: __event GridViewEditEventHandler* RowEditing;
In [ JScript ], you can handle the events defined by a class, but you cannot define your own.
The RowEditing event is raised whenever an Edit button associated with an item in the GridView control is clicked, but before the 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.
Information related to the RowEditing event is passed via a GridViewEditEventArgs object to the method assigned to handle the event. The following GridViewEditEventArgs 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 ) |
NewEditIndex |
Gets or sets the index of the row being edited. |
GridView Members Allowing Users to Edit Rows in a GridView Control