語言

DataGridViewCell.LeaveUnsharesRow(Int32, Boolean) 方法

定義

表示當焦點離開該列中的某個格子時,該列是否會被取消共享。

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

參數

rowIndex
Int32

該格子父列的索引。

throughMouseClick
Boolean

true 如果使用者操作將焦點移到該格子; false 如果程式化操作將焦點移到細胞上。

傳回

true 如果該列將是未共享的,否則, false。 基底 DataGridViewCell 類別總是回傳 false。

備註

LeaveUnsharesRow該方法在方法之前OnLeave被呼叫。 如果呼叫 的true結果是取消了包含該儲存格的該列,則必須返回OnLeave。 否則,它應該會返回 false。

如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法。

適用於

另請參閱