By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
Nov 20 '05 #2

P: n/a
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
"Cor Ligthert" <no**********@planet.nl> skrev i meddelandet
news:e8**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #3

P: n/a
Hi Lars,

I really do not know however this is written about the Tab key, and the
datagrids in the dotnet newsgroups.
http://tinyurl.com/47ocy

Maybe you can find there a solution?

Cor
Nov 20 '05 #4

P: n/a
* "Lars Netzel" <[stop_spam]@host.topdomain> scripsit:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #5

P: n/a
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
"Cor Ligthert" <no**********@planet.nl> skrev i meddelandet
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Lars,

I really do not know however this is written about the Tab key, and the
datagrids in the dotnet newsgroups.
http://tinyurl.com/47ocy

Maybe you can find there a solution?

Cor

Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.