473,703 Members | 2,657 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5879
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********@cin fin.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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********@cin fin.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.KeyEventA rgs) Handles DataGrid.KeyDow n

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********@cin fin.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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
16305
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 from going to currentRow + 1. Instead I want it to give focus to the next cell (currentCol + 1) to the right if not at the end of the row. Example:
4
1942
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 how do i write the event (pressing the enter key) and how can i move to the next column thank you
1
1615
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
1744
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 string is "" till i'll move to the next cell and then i will get the string. how can i get the string after each keypress? thank you
1
3222
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 process. i found 2 puzzeling exception: if the user is inside the text box of a ComboBox, the keystrokes aren't captured in the form's keypress event. i have to separately capture the
9
3806
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 DataGridCell events but it doesn't have the keypress event. Robert
3
3068
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 keypress while in a cell of a datagrid but it doesn't fire the keypress event.
6
3307
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" objCol.Width = 60 objCol.Format = "C" objDGTS.GridColumnStyles.Add(objCol) ' create keypress, validating events for this textbox column only Dim dgtb As DataGridTextBox = CType(objCol.TextBox, DataGridTextBox)
2
5551
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 cell. I'm trying to figure out how to capture the Enter key so to run the buttoncontrol click function. I can get this to work when the datagrid only is activated (by clicking on the whitespace of the grid) but of course it won't work when the cursor...
1
1692
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 DataGrid, if a user modify the Unit or UnitPrice, then the value of the column TotalPrice will respond returning the value of Unit * UnitPrice, after the user press the button. I tried in the KeyPress event but I have encountered some problem, if the...
0
8750
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8662
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9111
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9004
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7853
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6585
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4421
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4679
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.