DataGridViewCell.OnKeyPress(KeyPressEventArgs, Int32) DataGridViewCell.OnKeyPress(KeyPressEventArgs, Int32) DataGridViewCell.OnKeyPress(KeyPressEventArgs, Int32) DataGridViewCell.OnKeyPress(KeyPressEventArgs, Int32) Method

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 KeyPressEventArgs KeyPressEventArgs KeyPressEventArgs

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

rowIndex
Int32 Int32 Int32 Int32

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

Comentarios

Este método es similar a la Control.OnKeyPress método.This method is similar to the Control.OnKeyPress method. Se llama en las mismas circunstancias en que un KeyPress se genera el evento, pero realmente no provoca 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: