System.Web.UI.WebControls Namespace FormView Class
.NET Framework version 2.0
Returns the row index of the data bound to the FormView control.
Script |
[ integer variable = ] FormView.DataItemIndex |
variable |
The index number of the row from the data source bound to the FormView. |
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 FormView object. This property contains the same value as the PageIndex property.
NOTE: This property is not applicable when the FormView 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 FormView control.
FormView Members DataItem DataItemCount