DataGridViewRow::DataGridViewRowAccessibleObject::Select Method (AccessibleSelection)
Modifies the selection or moves the keyboard focus of the accessible object.
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
One of the AccessibleSelection values.
| Exception | Condition |
|---|---|
| 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 |
|---|---|
The DataGridView takes focus. | |
The DataGridViewCell in the row takes focus. | |
The DataGridViewCell is added to the SelectedCells property. | |
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.
to call unmanaged code. Demand value: Demand. Permission value: UnmanagedCode
Available since 2.0