DataGridViewRow.DataGridViewRowAccessibleObject.Select メソッド

定義

ユーザー補助オブジェクトの選択項目の修正またはキーボード フォーカスの移動を行います。

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)

パラメーター

flags
AccessibleSelection

AccessibleSelection 値のいずれか 1 つ。

例外

Owner プロパティの値が null です。

注釈

次の表では、メソッドが各flags値に対して実行するSelectアクションについて説明します。

パラメーター値 操作
TakeFocus フォーカスを DataGridView 取得します。
TakeSelection DataGridViewCell行の中にフォーカスがあります。
AddSelection プロパティ DataGridViewCellSelectedCells 追加されます。
RemoveSelection プロパティ DataGridViewCell から SelectedCells 削除されます。

値を TakeSelection 指定すると、現在フォーカスがあるセルの DataGridViewCell 列は、現在 DataGridViewRowのフォーカスを取得するセルと同じです。 たとえば、行 10、セル 3 にフォーカスがあり、行 15 に指定 TakeSelection すると、行 15、セル 3 にフォーカスが設定されます。 行の最初のセルは、フォーカスがあるセルにフォーカスがない DataGridViewCell 場合にフォーカスを DataGridView 取得します。

適用対象

こちらもご覧ください