語言

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 A 包含事件資料。

rowIndex
Int32

該格子父列的索引。

傳回

true 如果該列將是未共享的,否則, false。 基底 DataGridViewCell 類別總是回傳 false。

備註

KeyDownUnsharesRow該方法在方法之前OnKeyDown被呼叫。 如果呼叫 與true相同OnKeyDown參數導致包含該儲存格的列取消共享,則必須回傳KeyEventArgs。 否則,它應該會返回 false。

如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法。

適用於

另請參閱