DataGridViewCell.DataGridViewCellAccessibleObject.Select Method (AccessibleSelection)

 

Modifies the selection or moves the keyboard focus of the accessible object.

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

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

Parameters

flags
Type: System.Windows.Forms.AccessibleSelection

One of the AccessibleSelection values.

Exception Condition
InvalidOperationException

The value of the Owner property is null.

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

Parameter value

Action

TakeFocus

The DataGridView takes focus.

TakeSelection

The DataGridViewCell that owns this DataGridViewCell.DataGridViewCellAccessibleObject takes focus.

AddSelection

The DataGridViewCell is added to the SelectedCells property.

RemoveSelection

The DataGridViewCell is removed from the SelectedCells property.

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: