System.Web.UI.WebControls.GridView.RowCreated Event

Occurs when a row is created in a System.Web.UI.WebControls.GridView control.

Syntax

public event GridViewRowEventHandler RowCreated

Remarks

Before the System.Web.UI.WebControls.GridView control can be rendered, a System.Web.UI.WebControls.GridViewRow object must be created for each row in the control. The GridView.RowCreated event is raised when each row in the System.Web.UI.WebControls.GridView control is created. This enables you to provide an event-handling method that performs a custom routine, such as adding custom content to a row, whenever this event occurs.

A System.Web.UI.WebControls.GridViewRowEventArgs object is passed to the event-handling method, which enables you to access the properties of the row being created. To access a specific cell in the row, use the TableRow.Cells property of the System.Web.UI.WebControls.GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being created by using the GridViewRow.RowType property.

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