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

KeyEventArgs,它包含有关按键操作的数据。

rowIndex
Int32

包含该单元格的行的索引。

返回

如果按下了空格键,但未同时按下 Ctrl、Alt 和 Shift 键,为 true;否则为 false

注解

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

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

适用于

另请参阅