DataGridViewCell.KeyPressUnsharesRow(KeyPressEventArgs, Int32) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示在焦点位于该行的单元格上并同时按任意键时,是否取消行的共享。
protected:
virtual bool KeyPressUnsharesRow(System::Windows::Forms::KeyPressEventArgs ^ e, int rowIndex);
C#
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
包含事件数据的 KeyPressEventArgs。
- rowIndex
- Int32
该单元格的父行索引。
如果不共享该行,则为 true
;否则为 false
。
DataGridViewCell 基类总是返回 false
。
方法 KeyPressUnsharesRow 在 方法之前 OnKeyPress 调用。 在派生类中,如果对 OnKeyPress 的调用具有取消共享包含单元格的行的效果,则必须返回 true
。 否则,它应返回 false
。
有关行共享的详细信息,请参阅缩放 Windows 窗体 DataGridView 控件的最佳做法。
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |