DataGridViewCell.OnKeyPress(KeyPressEventArgs, Int32) Método

Definición

Se le llama cuando se presiona una tecla mientras el foco está en una celda.Called when a key is pressed while the focus is on a cell.

protected:
 virtual void OnKeyPress(System::Windows::Forms::KeyPressEventArgs ^ e, int rowIndex);
protected virtual void OnKeyPress (System.Windows.Forms.KeyPressEventArgs e, int rowIndex);
abstract member OnKeyPress : System.Windows.Forms.KeyPressEventArgs * int -> unit
override this.OnKeyPress : System.Windows.Forms.KeyPressEventArgs * int -> unit
Protected Overridable Sub OnKeyPress (e As KeyPressEventArgs, rowIndex As Integer)

Parámetros

e
KeyPressEventArgs

Objeto KeyPressEventArgs que contiene los datos del evento.A KeyPressEventArgs that contains the event data.

rowIndex
Int32

Índice de la fila primaria de la celda.The index of the cell's parent row.

Comentarios

Este método es similar al método Control.OnKeyPress.This method is similar to the Control.OnKeyPress method. Se llama en las mismas circunstancias en las que se genera un evento de KeyPress, pero realmente no genera el evento.It is called in the same circumstances in which a KeyPress event is raised, but it does not actually raise the event.

Se aplica a

Consulte también: