DataGridViewCell.MouseClickUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewCell.MouseClickUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewCell.MouseClickUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewCell.MouseClickUnsharesRow(DataGridViewCellMouseEventArgs) Method

定义

指示在鼠标指针位于某行的单元格上,同时用户单击鼠标按钮时,是否应对该行取消共享。Indicates whether a row will be unshared if the user clicks a mouse button while the pointer is on a cell in the row.

protected:
 virtual bool MouseClickUnsharesRow(System::Windows::Forms::DataGridViewCellMouseEventArgs ^ e);
protected virtual bool MouseClickUnsharesRow (System.Windows.Forms.DataGridViewCellMouseEventArgs e);
abstract member MouseClickUnsharesRow : System.Windows.Forms.DataGridViewCellMouseEventArgs -> bool
override this.MouseClickUnsharesRow : System.Windows.Forms.DataGridViewCellMouseEventArgs -> bool
Protected Overridable Function MouseClickUnsharesRow (e As DataGridViewCellMouseEventArgs) As Boolean

参数

返回

如果不共享该行,则为 true;否则为 falsetrue if the row will be unshared, otherwise, false. DataGridViewCell 基类总是返回 falseThe base DataGridViewCell class always returns false.

注解

MouseClickUnsharesRow之前调用方法OnMouseClick方法。The MouseClickUnsharesRow method is called just before the OnMouseClick method. 它必须返回true如果在调用OnMouseClick的取消共享已包含该单元格的行的效果。It must return true if the call to OnMouseClick has the effect of unsharing the row containing the cell. 否则,它应返回falseOtherwise, it should return false.

有关行共享的详细信息,请参阅缩放 Windows 窗体 DataGridView 控件的最佳做法For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.

适用于

另请参阅