473,398 Members | 2,120 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,398 software developers and data experts.

DataGrid - KeyPress event

When moving up and down with the arrow keys on my DataGrid, I cannot get
either the Keypress, KeyUp or KeyDown events to respond. I am putting
breakpoints in to capture the event but they never get fired. Any input
will be helpful.

JOhn
Nov 15 '05 #1
4 5835
Ok this may sound a bit unorthodox but if you try it you will be amazed at
how good the results can be. First obtain a graphic of Michael Jordon that
shows him about to make a difficult shot. Note the position of his tongue as
he attempts the shot. Now here is the most important part.....as closely as
possible mimic this critical tongue position you retry the Keypress, KeyUp
or KeyDown events.

I love this game!

"john sutor" <jo********@cinfin.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
When moving up and down with the arrow keys on my DataGrid, I cannot get
either the Keypress, KeyUp or KeyDown events to respond. I am putting
breakpoints in to capture the event but they never get fired. Any input
will be helpful.

JOhn

Nov 15 '05 #2
john sutor wrote:
When moving up and down with the arrow keys on my DataGrid, I cannot
get either the Keypress, KeyUp or KeyDown events to respond. I am
putting breakpoints in to capture the event but they never get fired.
Any input will be helpful.


Does the selected index changed event fire?
Christina Androne
Nov 15 '05 #3
"john sutor" <jo********@cinfin.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
When moving up and down with the arrow keys on my DataGrid, I cannot get
either the Keypress, KeyUp or KeyDown events to respond. I am putting
breakpoints in to capture the event but they never get fired. Any input
will be helpful.
Don't know about key events, but is the CellChanged event firing?

Tobin
JOhn

Nov 15 '05 #4
Alright.....try this...
You should create a method than handle de keydown event. something like
this

Private Sub Move_Grid (ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles DataGrid.KeyDown

End Sub

There you should check if the key pressed is the one you want to react,
like this:

If e.KeyCode = Keys.PageDown then or something like this
[Code for scrolling down]
End if

well I hope this helps....

David Sabo
Caracas, Venezuela
"john sutor" <jo********@cinfin.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
When moving up and down with the arrow keys on my DataGrid, I cannot get
either the Keypress, KeyUp or KeyDown events to respond. I am putting
breakpoints in to capture the event but they never get fired. Any input
will be helpful.

JOhn

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Byron McClain | last post by:
.... is being consumed. I added an event handler for the "keypress" event and my delegate never gets executed. Why? I am trying to catch the "enter" key pressed event to prevent the DataGrid...
4
by: Gidi | last post by:
Hello i'm writing a C# Window appliction and i'm using DataGrid as a table i want the user to enter data in each column and by pressing the enter key to move to the next column how can i write it...
1
by: Gidi | last post by:
hello how can i make a different keypress event for each coulmn in dataGrid (in C#, windows application) to whom i need to register the event?? thank you...
2
by: Gidi | last post by:
hello, i have a datagrid and i want to deal with the string that enter on a currentCell after each KeyPress and data entering, the problem is that while i'm still at the same cell i get that the...
1
by: ray well | last post by:
hi, i need to preview the keys in my app in order to process F1-F10. i set keypreview of my form to true, and it does capture the keystrokes from all over the forms controls which i then...
9
by: robert_rowe | last post by:
Does anyone know how to detect keypresses in a Datagrid cell? The Keypress event ofthe datagrid doesn't fire if you are in a cell. Neither does KeyUp & KeyDown. I've tried hooking in to the...
3
by: Terry Olsen | last post by:
Is there anyway to cause a KeyPress event in a datagrid cell? The only way I get a keypress event is if none of the cells are selected. I was hoping to have the program respond to a certain...
6
by: Bruce D | last post by:
I have a datagrid (uggg) that I use and create the columns programmatically...see below. objCol = New DataGridTextBoxColumn objCol.MappingName = "amount" objCol.HeaderText = "Amount"...
2
by: chatelain | last post by:
Ok a couple things I've got going: On the DataGrid1_CurrentCellChanged I add a button control to the datagridtextbox. This occurs when a mouse click happens inside the cell or the cursor enters the...
1
by: Jason Huang | last post by:
Hi, In my C# 1.1 windows form project, I have a form Form1 which has a DataGrid DataGrid1. In the DataGrid1, I have 3 columns, they are Unit, UnitPrice, TotalPrice. What I want is in this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.