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

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 3450
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
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
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.