语言

DataGridViewCheckBoxCell.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 如果按下空格键且 CTRL、Alt 和 SHIFT 键均未按下,则为 ;否则,为 false.

注解

KeyDownUnsharesRow 在前面 OnKeyDown调用 。 如果对true具有相同OnKeyDown参数的调用具有取消共享包含单元格的行的效果,则它必须返回KeyEventArgs。 否则,它应返回 false 。

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

适用于

另请参阅