ListViewItemEventArgs Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Provides data for the ItemCreated and ItemDataBound events.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)


public ref class ListViewItemEventArgs : EventArgs


Initializes a new instance of the ListViewItemEventArgs class.


Gets the item that is being created or bound to data.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

Before the ListView control can be rendered, a ListViewItem object must be created for each item in the control. The ItemCreated event is raised every time that an item in the ListView control is created. This enables you to provide an event-handling method that performs a custom routine whenever an item is created, such as adding custom content to an item.

Similarly, before the ListView control can be rendered, every item in the control must be bound to a record in the data source. The ItemDataBound event is raised when an item (represented by a ListViewItem object) is bound to data in the ListView control. This enables you to perform a custom routine whenever an item is bound to data, such as modifying the values of the data before they are displayed.

A ListViewItemEventArgs object is passed to the event-handling method, which enables you to access the properties of the item that raised the event. To determine which item type (data item, empty item, or insert item) is being created, use the ItemType property of the ListViewItem object.

For a list of initial property values for an instance of ListViewItemEventArgs, see the ListViewItemEventArgs constructor.

The following example shows how to use the ListViewItemEventArgs object to access the properties of the item that is being bound to data.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top