語言

DataGridViewCell.KeyPressUnsharesRow(KeyPressEventArgs, Int32) 方法

定義

表示若在列中某格有焦點時按下鍵,該列是否會被取消共享。

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

參數

e
KeyPressEventArgs

KeyPressEventArgs A 包含事件資料。

rowIndex
Int32

該格子父列的索引。

傳回

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

備註

KeyPressUnsharesRow該方法在方法之前OnKeyPress被呼叫。 在導出類別中,若呼叫 會true解除包含該儲存格的列,則必須回傳OnKeyPress。 否則,它應該會返回 false。

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

適用於

另請參閱