This documentation is archived and is not being maintained.

DataGrid.ItemCreated Event

Occurs on the server when an item in the DataGrid control is created.

[Visual Basic]
Public Event ItemCreated As DataGridItemEventHandler
public event DataGridItemEventHandler ItemCreated;
public: __event DataGridItemEventHandler* ItemCreated;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type DataGridItemEventArgs containing data related to this event. The following DataGridItemEventArgs property provides information specific to this event.

Property Description
Item Gets the referenced item in the DataGrid control when the event is raised.


The ItemCreated event is raised when an item in the DataGrid control is created, both during round-trips and at the time data is bound to the control.

The ItemCreated event is commonly used to control the content and appearance of a row in the DataGrid control.

For more information about handling events, see Consuming Events.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

DataGrid Class | DataGrid Members | System.Web.UI.WebControls Namespace | OnItemCreated | DataGridItemEventArgs | DataGridItemEventHandler