Gets the position of the data item as displayed in the ListView control.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
The property corresponds to the current position of the item as displayed by the ListView control. Each item's value reflects the order in which they were added to the control in that particular page of data. You can use the property to retrieve a ListViewDataItem object in the Items collection.
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 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.
Protected Sub PreferredCheckBox_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) ' Gets the CheckBox object that fired the event. Dim chkBox As CheckBox = CType(sender, CheckBox) ' Gets the item that contains the CheckBox object. Dim item As ListViewDataItem = CType(chkBox.Parent.Parent, ListViewDataItem) ' Update the database with the changes. VendorsListView.UpdateItem(item.DisplayIndex, False) End Sub