DataGridViewCell.EnterUnsharesRow(Int32, Boolean) DataGridViewCell.EnterUnsharesRow(Int32, Boolean) DataGridViewCell.EnterUnsharesRow(Int32, Boolean) DataGridViewCell.EnterUnsharesRow(Int32, Boolean) Method

定義

指出當焦點移至儲存格時,是否將取消共用父資料列。Indicates whether the parent row will be unshared when the focus moves to the cell.

protected:
 virtual bool EnterUnsharesRow(int rowIndex, bool throughMouseClick);
protected virtual bool EnterUnsharesRow (int rowIndex, bool throughMouseClick);
abstract member EnterUnsharesRow : int * bool -> bool
override this.EnterUnsharesRow : int * bool -> bool
Protected Overridable Function EnterUnsharesRow (rowIndex As Integer, throughMouseClick As Boolean) As Boolean

參數

rowIndex
Int32 Int32 Int32 Int32

儲存格的父資料列索引。The index of the cell's parent row.

throughMouseClick
Boolean Boolean Boolean Boolean

如果使用者動作將焦點移動至儲存格則為 true,如果程式設計作業將焦點移動至儲存格則為 falsetrue if a user action moved focus to the cell; false if a programmatic operation moved focus to the cell.

傳回

如果不共用資料列則為 true,否則為 falsetrue if the row will be unshared; otherwise, false. 基底 DataGridViewCell 類別永遠會傳回 falseThe base DataGridViewCell class always returns false.

備註

方法只會在OnEnter方法之前呼叫。 EnterUnsharesRowThe EnterUnsharesRow method is called just before the OnEnter method. true如果的OnEnter呼叫具有將包含儲存格的資料列取消共用的效果,則必須傳回。It must return true if the call to OnEnter has the effect of unsharing the row containing the cell. 否則,它應該false會傳回。Otherwise, it should return false.

如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.

適用於

另請參閱