次の方法で共有


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)

パラメーター

例外

Owner プロパティの値はnull

注釈

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

パラメーター値 アクション
TakeFocus DataGridViewはフォーカスを取ります。
TakeSelection 行の DataGridViewCell にフォーカスが移動します。
AddSelection DataGridViewCellSelectedCells プロパティに追加されます。
RemoveSelection DataGridViewCellは、SelectedCells プロパティから削除されます。

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

適用対象

こちらもご覧ください