DataGridViewTopLeftHeaderCell::DataGridViewTopLeftHeaderCellAccessibleObject::Select Method (AccessibleSelection)

 

Modifies the selection in the DataGridView control or sets input focus to the control.

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

public:
[SecurityPermissionAttribute(SecurityAction::Demand, Flags = SecurityPermissionFlag::UnmanagedCode)]
virtual void Select(
	AccessibleSelection flags
) override

Parameters

flags
Type: System.Windows.Forms::AccessibleSelection

A bitwise combination of the AccessibleSelection values.

Exception Condition
InvalidOperationException

The Owner property value is null.

The following table describes the action performed for each flags value.

Parameter value

Action

TakeFocus

Sets input focus to the DataGridView control. If the control contains any visible cells, sets focus to the cell in the first row and column.

AddSelection

If the MultiSelect property value is true, selects all cells in the control.

RemoveSelection

If the flags value does not contain the AddSelection value, clears the selection in the control.

All other AccessibleSelection values

No action is taken.

SecurityPermission

to call unmanaged code. Demand value: Demand. Permission value: UnmanagedCode

.NET Framework
Available since 2.0
Return to top
Show: