DataGridViewCell.OnClick(DataGridViewCellEventArgs) 方法

定义

在单击单元格时进行调用。Called when the cell is clicked.

protected:
 virtual void OnClick(System::Windows::Forms::DataGridViewCellEventArgs ^ e);
protected virtual void OnClick (System.Windows.Forms.DataGridViewCellEventArgs e);
abstract member OnClick : System.Windows.Forms.DataGridViewCellEventArgs -> unit
override this.OnClick : System.Windows.Forms.DataGridViewCellEventArgs -> unit
Protected Overridable Sub OnClick (e As DataGridViewCellEventArgs)

参数

e
DataGridViewCellEventArgs

包含事件数据的 DataGridViewCellEventArgsA DataGridViewCellEventArgs that contains the event data.

注解

此方法类似于 DataGridView.OnCellClick 方法。This method is similar to the DataGridView.OnCellClick method. 在引发事件的相同情况下,它会被调用 DataGridView.CellClick ,但实际上不会引发事件。It is called in the same circumstances in which a DataGridView.CellClick event is raised, but it does not actually raise the event.

适用于

另请参阅