IDataItemContainer.DisplayIndex Property

Definition

When implemented, gets the position of the data item as displayed in a control.

C#
public int DisplayIndex { get; }

Property Value

An Integer representing the position of the data item as displayed in a control.

Examples

The following code example demonstrates an implementation of the DisplayIndex property. It is part of a larger example in the IDataItemContainer class overview topic.

C#
int IDataItemContainer.DisplayIndex
{
    get
    {
        return _itemIndex;
    }
}

Remarks

In implementing classes such as DataGridViewColumn, the DisplayIndex property is set according to the index of the row among the displayed rows.

Applies to

Produkt Verzie
.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