Export (0) Print
Expand All

DataGridViewRow.DataGridViewRowAccessibleObject.Select Method

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.

ExceptionCondition
InvalidOperationException

The value of the Owner property is null.

The following table describes the action that Select method will perform for each flags value.

Parameter value

Action

TakeFocus

The DataGridView takes focus.

TakeSelection

The DataGridViewCell in the row takes focus.

AddSelection

The DataGridViewCell is added to the SelectedCells property.

RemoveSelection

The DataGridViewCell is removed from the SelectedCells property.

When you specify the TakeSelection value, the column of the DataGridViewCell that currently has focus is the same as the cell that will take focus in the current DataGridViewRow. For example, if row 10, cell 3 has focus, and you specify TakeSelection for row 15, then row 15, cell 3 will have focus. The first cell in the row will take focus if no DataGridViewCell in the DataGridView has focus.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft