473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Generating KeyPress in DataGridView control

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
1 6027

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LordHog | last post by:
Hello all, I am trying to implement an event handler for the KeyPress event for a cell within a DataGridView control. The obvous starting point from the DataGridView keypress event, but this...
4
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
3
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
2
by: Bob | last post by:
In that event, how can you find out if the keypress event was in a certain column? Say you have datagridview1, columnname1, columnName2 You want to do something only with the keypress event of...
0
by: Rich | last post by:
Hello, I have been using "Concole.WriteLine("Event Name") for almost every event in the datagridview control, but I can't get the KeyPress event to file. My goal is to force uppercase on the...
0
by: jeastman - Hotmail | last post by:
Hello world Excuse, not to be written English and it helps me with a translator. I am new programming in C#. I made a control inheriting the DataGridView to be able to add controls done by...
1
by: Jeff | last post by:
Hey ..NET 2.0 I've created a User Control which contain a DataGridView. This User Control is displayed on a TabPage. This TabPage is added to the TabControl during runtime. The problem is...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.