473,395 Members | 1,584 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,395 software developers and data experts.

dg_KeyPress???

Hi,

I am trying to catch the KeyPress event of my datagrid, but nothing is
happening, the event is not firing?

private void dgGLBatch_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e) {

if (e.KeyChar == (char)13)

SendKeys.SendWait("{TAB}");

}

Any help would be appreciated.

Regards

Darryn
Nov 16 '05 #1
2 962
Hi,

have you registered the handler associated with the event, e.g.,

dgGLBatch.KeyPress += new KeyPressEventHandler(dgGLBatch_KeyPress);

Regards
Joyjit

"Darryn Ross" <da****@datawave.com.au> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

I am trying to catch the KeyPress event of my datagrid, but nothing is
happening, the event is not firing?

private void dgGLBatch_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e) {

if (e.KeyChar == (char)13)

SendKeys.SendWait("{TAB}");

}

Any help would be appreciated.

Regards

Darryn

Nov 16 '05 #2
I tired that too and to no avail! i am wondering does it matter if i have a
custom table and Column styles setup??

"Joyjit Mukherjee" <jo**************@hotmail.com> wrote in message
news:eW**************@tk2msftngp13.phx.gbl...
Hi,

have you registered the handler associated with the event, e.g.,

dgGLBatch.KeyPress += new KeyPressEventHandler(dgGLBatch_KeyPress);

Regards
Joyjit

"Darryn Ross" <da****@datawave.com.au> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

I am trying to catch the KeyPress event of my datagrid, but nothing is
happening, the event is not firing?

private void dgGLBatch_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e) {

if (e.KeyChar == (char)13)

SendKeys.SendWait("{TAB}");

}

Any help would be appreciated.

Regards

Darryn


Nov 16 '05 #3

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

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.