FormView.DataItemIndex Property

Definition

Gets the index of the data item bound to the FormView control from the data source.

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

Property Value

The index of the data item bound to the FormView control from the data source.

Attributes

Remarks

Use the DataItemIndex property to determine the index of the data item bound to the FormView control from the data source. This property contains the same value as the PageIndex property.

备注

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.

Applies to

产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also