Hi Tim,
I am glad my sample code makes sence to you.
I also took notice of the datagrid's default navigation behavior in the
first column first row and last column last row.
In my personal feeling, I think your new way of design feels more
comfortable

Anyhow, your program finally works, enjoy it.
Have a nice day.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: (e-mail address removed) (Tim Frawley)
| Newsgroups: microsoft.public.dotnet.languages.vb
| Subject: Re: Anyone know how to capture a Shift+Tab in the KeyPress event?
| Date: 23 Oct 2003 12:46:55 -0700
| Organization:
http://groups.google.com
| Lines: 34
| Message-ID: <bfb6a0a.0310231146.d4b3d23@posting.google.com>
| References: <bfb6a0a.0310211642.6c9725ca@posting.google.com>
<Jvyd40FmDHA.1544@cpmsftngxa06.phx.gbl>
| NNTP-Posting-Host: 146.63.252.53
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1066938416 25993 127.0.0.1 (23 Oct 2003
19:46:56 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Thu, 23 Oct 2003 19:46:56 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!diablo.theplanet.net!news.maxwell.syr.edu!postnews
1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:149657
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Jeffrey,
|
| Thank you for the information. You are right, the grid does normally
| respond to the tab key as well as shift tab for navigation. I have
| utilized your code example for the following parts of the grid
| navigation that where not supported.
|
| When the user is on the first row, first column of the datagrid and
| they press Shift+Tab they will navigate to the control prior to the
| grid. My code to allow tabbing out of the control when on the first
| row, first col would have acted as a Tab because I could not properly
| detect a Shift+Tab in the KeyPress event. Your override method gave
| me the ability to test for that condition and handle it appropriately.
|
| When the user is on the last row, last column of the grid and they
| press Tab they will navigate to the next control rather than having to
| hit CTRL+Tab. Also, if the user is on the last row, last column if
| they hit Shift+Tab they will navigate backwards. My code to allow
| tabbing out of the control when on the last row, last col would have
| jumped them to the next control because I could not properly detect
| the Shift+Tab in the KeyPress event. Your override method gave me the
| ability to test for that condition and handle it appropriately.
|
| Other than these override conditions for tabbing in and out of the
| control the normal navigation of the grid is left 'as is'.
|
| Your help is much appreciated. Thank you!
|
| And to everyone who posted on this request, thank you! Your insights
| have been very useful!
|
| Sincerely,
|
| Tim Frawley
|