System.Web.UI.WebControls.DataGrid.EditCommand Event

Occurs when the Edit button is clicked for an item in the System.Web.UI.WebControls.DataGrid control.

Syntax

public event DataGridCommandEventHandler EditCommand

Remarks

The DataGrid.EditCommand event is raised when the Edit button is clicked for an item in the System.Web.UI.WebControls.DataGrid control.

A typical handler for the DataGrid.EditCommand event sets the DataGrid.EditItemIndex property to the selected row and then rebinds the data to the System.Web.UI.WebControls.DataGrid control.

Note:

Text is not HTML encoded before it is displayed in the System.Web.UI.WebControls.DataGrid control. This makes it possible to embed script within HTML tags in the text. If the values for the control come from user input, be sure to validate the values to reduce security vulnerabilities.

For more information about handling events, see [<topic://cpconEventsOverview>].

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0