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.

适用于

另请参阅