DataGridViewRow::State Property
.NET Framework (current version)
Gets the current state of the row.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: property DataGridViewElementStates State { virtual DataGridViewElementStates get() override; }
Property Value
Type: System.Windows.Forms::DataGridViewElementStatesA bitwise combination of DataGridViewElementStates values indicating the row state.
| Exception | Condition |
|---|---|
| InvalidOperationException | The row is in a DataGridView control and is a shared row. |
You cannot use this property with shared rows because shared rows do not store their state locally. To get the state of a shared row, use the GetState method.
.NET Framework
Available since 2.0
Available since 2.0
Show: