DataGridViewRow.DataGridViewRowAccessibleObject.Select Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Modifies the selection or moves the keyboard focus of the accessible object.
public:
override void Select(System::Windows::Forms::AccessibleSelection flags);
public override void Select (System.Windows.Forms.AccessibleSelection flags);
override this.Select : System.Windows.Forms.AccessibleSelection -> unit
Public Overrides Sub Select (flags As AccessibleSelection)
Parameters
- flags
- AccessibleSelection
One of the AccessibleSelection values.
Exceptions
The value of the Owner property is null
.
Remarks
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.