DataGridViewButtonCell.KeyUpUnsharesRow(KeyEventArgs, Int32) 方法
定义
指示焦点位于行中的某个单元格上释放某个键时是否取消共享该行。Indicates whether a row is unshared when a key is released while the focus is on a cell in the row.
protected:
override bool KeyUpUnsharesRow(System::Windows::Forms::KeyEventArgs ^ e, int rowIndex);
protected override bool KeyUpUnsharesRow (System.Windows.Forms.KeyEventArgs e, int rowIndex);
override this.KeyUpUnsharesRow : System.Windows.Forms.KeyEventArgs * int -> bool
Protected Overrides Function KeyUpUnsharesRow (e As KeyEventArgs, rowIndex As Integer) As Boolean
参数
包含事件数据的 KeyEventArgs。A KeyEventArgs that contains the event data.
- rowIndex
- Int32
该单元格的父行索引。The index of the cell's parent row.
返回
如果用户释放 SPACE 键,则为 true
;否则为 false
。true
if the user released the SPACE key; otherwise, false
.
注解
KeyUpUnsharesRow方法在方法之前调用 OnKeyUp 。The KeyUpUnsharesRow method is called just before the OnKeyUp method. true
如果对 OnKeyUp 具有相同参数的调用具有取消 KeyEventArgs 共享行的效果,则该方法必须返回 rowIndex
。It must return true
if the call to OnKeyUp with the same KeyEventArgs argument has the effect of unsharing the row rowIndex
. 否则应返回 false
。It should return false
otherwise.
有关行共享的详细信息,请参阅 缩放 Windows 窗体 DataGridView 控件的最佳做法。For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.