I can't catch "TAB" or "Return" Keys on KeyDown!

L

Lars Netzel

Hey!

I have tried...(in a datagrid)

e.KeyDate.Return
and
e.KeyDate.TAB
end
e.KeyDate.Enter

on KeyDown, KeyPress and KeyUp

I can't get it to fired off the event with those keys... with regular keys
as letters and stuff it works fine.

regards
/Lars
 
C

Cor Ligthert

Lars,

In my opinion you have to build your own datagrid for that (inherit form
datagrid).

And use an API directly to the keys, because the datagrid catches those keys
in advance.

Look at this page, I can try to find it for you exactly however maybe you
have more problems, and I thought it was on this page.

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

I hope this helps?

Cor
 
L

Lars Netzel

Okey! Welll my problem is that I can't USE TAB or send a TAB key when
pressing Enter in my grid cause I use a Style that hides a bunch of columns
in the grid BUT the TAB key seems to focus on those cells anyway before
changing row...
So if I'm on the last (visible) column and press TAB the focus looks like it
goes away... but if I press a few times more it changes row and starts
working okay again...

Is there a workaround maybe of NOT letting the TAB key go into the hidden
columns?

/Lars
 
H

Herfried K. Wagner [MVP]

* "Lars Netzel said:
I have tried...(in a datagrid)

e.KeyDate.Return
and
e.KeyDate.TAB
end
e.KeyDate.Enter

on KeyDown, KeyPress and KeyUp

I can't get it to fired off the event with those keys... with regular keys
as letters and stuff it works fine.

Override your form's 'ProcessDialogKey' method.
 
L

Lars Netzel

I just realized that since it's a Style for a Datagrid I don't need hidden
values... I still can access the data from that Dataset it's bound to.. of
course... I removed those hidden fieldcolumns and now the TAB works fine so
I trigger an TAB om Enter ...

Thanx anyway!

/Lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top