473,480 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

KeyPress Event on DataGrid Not Firing?

I've tried to Google for the answer...and I'm sure it's something
stupid...but for some reason if I try something as simple as this...I never
see a messagebox. I have created the columns programmatically using
'DataGridTextBoxColumn' and such. I can click on the colums and type over
what is displayed.

Any ideas?

Private Sub DataGrid1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles DataGrid1.KeyPress
' MsgBox(e.KeyChar.ToString)
MessageBox.show("Hello")
End Sub
TIA
-bruce
Nov 21 '05 #1
6 3452
Nevermind. I am slow today! Maybe being new to VB.NET doesn't help.

I found that the problem was that the textboxes have control and not the
grid...so I had to create keypress handlers for the texboxes inside the grid
and then it works.

Sorry to waste the posting space! Next time I'll wait until Tuesday :-)

-bruce
Nov 21 '05 #2
Nevermind. I am slow today! Maybe being new to VB.NET doesn't help.

I found that the problem was that the textboxes have control and not the
grid...so I had to create keypress handlers for the texboxes inside the grid
and then it works.

Sorry to waste the posting space! Next time I'll wait until Tuesday :-)

-bruce
Nov 21 '05 #3
Bruce,

Did you pass this site while searching on Google.

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

I thought there was something in it about your question

Be aware that it is sometimes very slow probably because DNS errors.

Cor
Nov 21 '05 #4
Bruce,

Did you pass this site while searching on Google.

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

I thought there was something in it about your question

Be aware that it is sometimes very slow probably because DNS errors.

Cor
Nov 21 '05 #5
Cor,
I used the IP address and it's quick as can be:
http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp

-bruce
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Bruce,

Did you pass this site while searching on Google.

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

I thought there was something in it about your question

Be aware that it is sometimes very slow probably because DNS errors.

Cor

Nov 21 '05 #6
Cor,
I used the IP address and it's quick as can be:
http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp

-bruce
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Bruce,

Did you pass this site while searching on Google.

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

I thought there was something in it about your question

Be aware that it is sometimes very slow probably because DNS errors.

Cor

Nov 21 '05 #7

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

Similar topics

4
5839
by: john sutor | last post by:
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...
3
7319
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
2
1122
by: David | last post by:
Hi all, I am dynamically creating a LinkButton in my datagrid, however, the event that I am creating for it is not firing. I am obviously missing something? What am I missing? Here is the...
3
3054
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...
0
328
by: Bruce D | last post by:
I've tried to Google for the answer...and I'm sure it's something stupid...but for some reason if I try something as simple as this...I never see a messagebox. I have created the columns...
1
1967
by: Andy | last post by:
Hi all, I'm a beginner. I have a problem. In my datagrid i have read only data grid. I written code to delete a row by using delete key in keydown event of datagrid. But this event is not always...
1
2155
by: Jim Hubbard | last post by:
Why isn't the Keypress event of the System.Windows.Form.ToolStripComboBox triggered by hitting the Enter key? I cannot trap Keys.Enter or Keys.Return in the Keypress event.
5
3057
by: Henry Jones | last post by:
I am new to C# and wanted to capture the KeyPress for a textbox. I created some code as follows: private void textBox3_KeyPress(object sender, System.EventArgs e) { this.textBox2.Text =...
2
5539
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...
0
6904
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
7080
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
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
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
2992
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...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.