DataGridViewCheckBoxCell.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

包含儲存格的資料列之索引。

傳回

如果按下空格鍵,而且未按下 CTRL、ALT 和 SHIFT 鍵,則為 true,否則為 false

備註

KeyDownUnsharesRow 在之前 OnKeyDown呼叫 。 如果具有相同KeyEventArgs自變數的呼叫OnKeyDown具有相同自變數,則它必須傳回 true ,以取消共用包含單元格的數據列的效果。 否則應該會傳回 false

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

適用於

另請參閱