DataGridViewButtonCell.KeyDownUnsharesRow(KeyEventArgs, Int32) 方法

定義

指出當焦點在資料列中的儲存格上並按下按鍵時,是否會取消共用資料列。

protected:
 override bool KeyDownUnsharesRow(System::Windows::Forms::KeyEventArgs ^ e, int rowIndex);
protected override bool KeyDownUnsharesRow (System.Windows.Forms.KeyEventArgs e, int rowIndex);
override this.KeyDownUnsharesRow : System.Windows.Forms.KeyEventArgs * int -> bool
Protected Overrides Function KeyDownUnsharesRow (e As KeyEventArgs, rowIndex As Integer) As Boolean

參數

e
KeyEventArgs

KeyEventArgs,其中包含事件資料。

rowIndex
Int32

儲存格的父資料列索引。

傳回

如果使用者按下空格鍵時並未按輔助按鍵 (Modifier Key) 則為 true,否則為 false

備註

方法 KeyDownUnsharesRow 會在方法之前 OnKeyDown 呼叫。 如果具有相同KeyEventArgs自變數的呼叫OnKeyDown具有取消共享資料列rowIndex的效果,它必須傳回 true 。 否則應該會傳回 false

如需數據列共用的詳細資訊,請參閱調整 Windows Forms DataGridView 控件的最佳做法

適用於

另請參閱