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 呼叫。 如果的呼叫OnLeave具有取消共用包含儲存格之資料列的效果,則它必須傳回 true 。 否則,它應該會傳回 false

如需數據列共用的詳細資訊,請參閱調整 Windows Forms DataGridView 控件的最佳做法

適用於

另請參閱