Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ListViewDataItem::DisplayIndex Property

Gets the position of the data item as displayed in the ListView control.

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

public:
virtual property int DisplayIndex {
	int get () override;
}

Property Value

Type: System::Int32
The zero-based position of the data item as displayed in the ListView control.

Implements

IDataItemContainer::DisplayIndex

The DisplayIndex property corresponds to the current position of the item as displayed by the ListView control. Each item's DisplayIndex value reflects the order in which they were added to the control in that particular page of data. You can use the DisplayIndex property to retrieve a ListViewDataItem object in the Items collection.

NoteNote

This property applies only to data items. It does not apply to insert items or empty items.

The following example shows how to use the DisplayIndex property to retrieve the index of the item that is being edited. This code example is part of a larger example provided for the ListView::UpdateItem method.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5
Show:
© 2015 Microsoft