IDataItemContainer.DisplayIndex 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
實作時,取得控制項中所顯示之資料項目的位置。
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 ,屬性會根據所顯示資料列之間的資料列索引進行設定。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應