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

定义

当焦点从单元格上移开时调用。Called when the focus moves from a cell.

protected:
 virtual void OnLeave(int rowIndex, bool throughMouseClick);
protected virtual void OnLeave (int rowIndex, bool throughMouseClick);
abstract member OnLeave : int * bool -> unit
override this.OnLeave : int * bool -> unit
Protected Overridable Sub OnLeave (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 from the cell; false if a programmatic operation moved focus from the cell.

注解

此方法是类似于DataGridView.OnCellLeave方法。This method is similar to the DataGridView.OnCellLeave method. 在同一环境中调用DataGridView.CellLeave引发事件,但不会实际引发该事件。It is called in the same circumstances in which a DataGridView.CellLeave event is raised, but it does not actually raise the event.

适用于

另请参阅