Generating KeyPress in DataGridView control

  • Thread starter Thread starter NayJo
  • Start date Start date
N

NayJo

I am writing a .NET 2.0 Windows Form app that accepts either keyed or
scanned data via a barcode scanner via SerialPort into one column of a
DataGridView control.

The program handles scanned input just fine but I want to simulate a tab key
or an enter key being pressed so I can trigger the validating event.

How would I do this?

mtia
 
I am writing a .NET 2.0 Windows Form app that accepts either keyed or
scanned data via a barcode scanner via SerialPort into one column of a
DataGridView control.

The program handles scanned input just fine but I want to simulate a tab key
or an enter key being pressed so I can trigger the validating event.

How would I do this?

mtia

DataGrid has Keyup and Key down event
eg. for checking the space from keyboard
if(e.KeyValue==32)
{
if(dbgrdReports.CurrentCell.ColumnNumber==3)
{

}
here i am check if the key board event is space than i am doing the
things
 
Back
Top