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

包含事件数据的 A KeyEventArgs

rowIndex
Int32

单元格的父行的索引。

返回

true 如果用户在没有修饰键的情况下按下了 SPACE 键,则为否则,为 false.

注解

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

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

适用于

另请参阅