System.Web.UI.WebControls.DataGrid.UpdateCommand Event

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

Syntax

public event DataGridCommandEventHandler UpdateCommand

Remarks

The DataGrid.UpdateCommand event is raised when the Update button for an item is clicked.

A typical handler for the DataGrid.UpdateCommand event updates the data, sets the DataGrid.EditItemIndex property to -1 (to deselect the item), 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