DataGridViewCell::Selected Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value indicating whether the cell has been selected.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
[BrowsableAttribute(false)]
property bool Selected {
	virtual bool get();
	virtual void set(bool value);
}

Property Value

Type: System::Boolean

true if the cell has been selected; otherwise, false.

Exception Condition
InvalidOperationException

There is no associated DataGridView when setting this property.

-or-

The owning row is shared when setting this property.

.NET Framework
Available since 2.0
Return to top
Show: