DataGridViewCheckBoxCell.OnKeyDown(KeyEventArgs, Int32) 方法

定義

當焦點在儲存格上,按下字元鍵時即會呼叫。

protected:
 override void OnKeyDown(System::Windows::Forms::KeyEventArgs ^ e, int rowIndex);
protected override void OnKeyDown (System.Windows.Forms.KeyEventArgs e, int rowIndex);
override this.OnKeyDown : System.Windows.Forms.KeyEventArgs * int -> unit
Protected Overrides Sub OnKeyDown (e As KeyEventArgs, rowIndex As Integer)

參數

e
KeyEventArgs

KeyEventArgs,其中包含事件資料。

rowIndex
Int32

目前儲存格的資料列索引,如果儲存格不屬於資料列,則為 -1。

備註

由空格鍵啟用時,此方法會導致儲存格的使用者介面 (UI) 更新。

這個方法類似于 Control.OnKeyDown 方法。 它會在引發事件的相同情況下 Control.KeyDown 呼叫,但實際上不會引發事件。

適用於

另請參閱