DataGridViewCell.KeyDownUnsharesRow(KeyEventArgs, Int32) 方法

定義

指出當焦點在儲存格上,而使用者按下按鍵時,是否取消共用父資料列。

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

參數

e
KeyEventArgs

KeyEventArgs,其中包含事件資料。

rowIndex
Int32

儲存格的父資料列索引。

傳回

如果會取消共用資料列則為 true,否則為 false。 基底 DataGridViewCell 類別永遠會傳回 false

備註

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

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

適用於

另請參閱