System.Web.UI.WebControls Namespace DetailsView Class
.NET Framework version 2.0
Returns the row index of the data bound to the DetailsView control.
Script |
[ integer variable = ] DetailsView.DataItemIndex |
variable |
The index number of the row from the data source bound to the DetailsView. |
The property is read only with no default value.
Use the DataItemIndex property to determine the index number of the record in the data source bound to the DetailsView object. This property contains the same value as the PageIndex property.
NOTE: This property is not applicable when the DetailsView control is in insert mode. When the control is in insert mode, the DataItemIndex property returns -1.
NOTE: This property applies only to data rows in the DetailsView control.
DetailsView Members DataItem DataItemCount