By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,122 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,122 IT Pros & Developers. It's quick & easy.

Generating KeyPress in DataGridView control

P: n/a
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
Jan 14 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a

On Jan 14, 8:13*pm, "NayJo" <CrawNOSPAMforMEf...@mindspring.com>
wrote:
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
Jan 15 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.