言語

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

rowIndex
Int32

セルの親行のインデックス。

返品

true 行が共有解除される場合は false。 基底 DataGridViewCell クラスは常に falseを返します。

注釈

KeyPressUnsharesRow メソッドは、OnKeyPress メソッドの直前に呼び出されます。 派生クラスでは、trueの呼び出しがセルを含む行の共有を解除する効果がある場合は、OnKeyPressを返す必要があります。 それ以外の場合は、 falseを返す必要があります。

行共有の詳細については、「 Windows フォーム DataGridView コントロールのスケーリングのベスト プラクティス」を参照してください。

適用対象

こちらもご覧ください