DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.Select Method (AccessibleSelection)

 
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.

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)

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

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: