DataGridViewRow::Selected Property
.NET Framework (current version)
Gets or sets a value indicating whether the row is selected.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: property bool Selected { virtual bool get() override; virtual void set(bool value) override; }
| Exception | Condition |
|---|---|
| InvalidOperationException | The row is in a DataGridView control and is a shared row. |
You cannot use this property with a shared row. For more information about shared rows, see Best Practices for Scaling the Windows Forms DataGridView Control.
.NET Framework
Available since 2.0
Available since 2.0
Show: