DataGridViewHeaderCell.GetInheritedState(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個值,表示該儲存格的當前狀態,該狀態是從其列或欄位的狀態繼承而來。
public:
override System::Windows::Forms::DataGridViewElementStates GetInheritedState(int rowIndex);
public override System.Windows.Forms.DataGridViewElementStates GetInheritedState(int rowIndex);
override this.GetInheritedState : int -> System.Windows.Forms.DataGridViewElementStates
Public Overrides Function GetInheritedState (rowIndex As Integer) As DataGridViewElementStates
參數
- rowIndex
- Int32
若該格不是列標頭或 DataGridView 控制項,則為包含該格或 -1 列的索引。
傳回
一個位元組合 DataGridViewElementStates 的值,代表細胞當前狀態。
例外狀況
該儲存格為列標頭儲存格,不 DataGridView 包含在控制項中,且 rowIndex 不為 -1。
-或-
該儲存格為列標頭儲存格,該儲存格包含在 DataGridView 控制項內,且 rowIndex 不在有效範圍 0 的列數減 1 之外。
-或-
該儲存格是列標頭儲存格,並非 rowIndex 包含該儲存格的該列的索引。
該單元格是欄位標頭單元,或是控制項的 TopLeftHeaderCell 單元格,且 rowIndex 不是 -1。