ListViewDataItem::DisplayIndex Property
Gets the position of the data item as displayed in the ListView control.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Property Value
Type: System::Int32The zero-based position of the data item as displayed in the ListView control.
Implements
IDataItemContainer::DisplayIndexThe 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.
Note |
|---|
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note