DataGridViewCell.InheritedState 属性

定义

获取该单元格从它的行和列的状态继承后的当前状态。Gets the current state of the cell as inherited from the state of its row and column.

public:
 property System::Windows::Forms::DataGridViewElementStates InheritedState { System::Windows::Forms::DataGridViewElementStates get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataGridViewElementStates InheritedState { get; }
[<System.ComponentModel.Browsable(false)>]
member this.InheritedState : System.Windows.Forms.DataGridViewElementStates
Public ReadOnly Property InheritedState As DataGridViewElementStates

属性值

DataGridViewElementStates

DataGridViewElementStates 值的按位组合,表示单元格的当前状态。A bitwise combination of DataGridViewElementStates values representing the current state of the cell.

属性

例外

该单元格不包含在 DataGridView 控件中,且它的 RowIndex 属性的值不为 -1。The cell is not contained within a DataGridView control and the value of its RowIndex property is not -1.

该单元格包含 DataGridView 控件中,且它的 RowIndex 属性的值为 -1。The cell is contained within a DataGridView control and the value of its RowIndex property is -1.

适用于

另请参阅