IDataItemContainer.DisplayIndex 屬性

定義

實作時,取得控制項中所顯示之資料項目的位置。

public:
 property int DisplayIndex { int get(); };
public int DisplayIndex { get; }
member this.DisplayIndex : int
Public ReadOnly Property DisplayIndex As Integer

屬性值

Integer,表示控制項中所顯示之資料項目的位置。

範例

下列程式碼範例示範 屬性的實作 DisplayIndex 。 它是類別概觀主題中較大範例的 IDataItemContainer 一部分。

int IDataItemContainer.DisplayIndex
{
    get
    {
        return _itemIndex;
    }
}
ReadOnly Property DisplayIndex() As Integer Implements IDataItemContainer.DisplayIndex
    Get
        Return _itemIndex
    End Get
End Property

備註

在實作 例如 DataGridViewColumn 的類別中 DisplayIndex ,屬性會根據所顯示資料列之間的資料列索引進行設定。

適用於

另請參閱