DataGridViewButtonCell.KeyDownUnsharesRow(KeyEventArgs, Int32) 方法

定义

指示焦点位于行中的某个单元格上按下某个键时是否取消共享该行。

protected:
 override bool KeyDownUnsharesRow(System::Windows::Forms::KeyEventArgs ^ e, int rowIndex);
protected override bool KeyDownUnsharesRow (System.Windows.Forms.KeyEventArgs e, int rowIndex);
override this.KeyDownUnsharesRow : System.Windows.Forms.KeyEventArgs * int -> bool
Protected Overrides Function KeyDownUnsharesRow (e As KeyEventArgs, rowIndex As Integer) As Boolean

参数

e
KeyEventArgs

包含事件数据的 KeyEventArgs

rowIndex
Int32

该单元格的父行索引。

返回

如果用户按下 SPACE 键(不包括组合键),则为 true;否则为 false

注解

方法 KeyDownUnsharesRow 在 方法之前 OnKeyDown 调用。 如果具有相同KeyEventArgs参数的 对 OnKeyDown 的调用具有取消共享行 rowIndex的效果,则它必须返回 true 。 否则应返回 false

有关行共享的详细信息,请参阅缩放 Windows 窗体 DataGridView 控件的最佳做法

适用于

另请参阅