System.Web.UI.WebControls.DetailsView.DataItemIndex Property

Gets the index of the item being displayed in a System.Web.UI.WebControls.DetailsView control from the underlying data source.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual int DataItemIndex { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the paging feature is enabled (by setting the DetailsView.AllowPaging property to true), use the DetailsView.DataItemIndex property to determine the index of the currently displayed record. You can also use this property to programmatically change the displayed record.

Note:

When the paging feature is enabled, you can also use this property to determine the page number of the record displayed; however, be aware that this property is zero-based.

To determine the total number of items in the data source, use the DetailsView.DataItemCount property.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0