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

定義

當焦點移至儲存格時呼叫。Called when the focus moves to a cell.

protected:
 virtual void OnEnter(int rowIndex, bool throughMouseClick);
protected virtual void OnEnter (int rowIndex, bool throughMouseClick);
abstract member OnEnter : int * bool -> unit
override this.OnEnter : int * bool -> unit
Protected Overridable Sub OnEnter (rowIndex As Integer, throughMouseClick 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.

備註

這個方法與DataGridView.OnCellEnter方法類似。This method is similar to the DataGridView.OnCellEnter method. 在引發DataGridView.CellEnter事件的相同情況下呼叫它,但實際上並不會引發事件。It is called in the same circumstances in which an DataGridView.CellEnter event is raised, but it does not actually raise the event.

適用於

另請參閱