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.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應