Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGridViewBand::Selected Property

 

Gets or sets a value indicating whether the band is in a selected user interface (UI) state.

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 band is selected; otherwise, false.

Exception Condition
InvalidOperationException

The specified value when setting this property is true, but the band has not been added to a DataGridView control.

-or-

This property is being set on a shared DataGridViewRow.

This property can be set only if a DataGridView with the SelectionMode property enabled is associated with the band.

The following code example illustrates the use of this property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft