Controling tabs within a datagrid

measu used Ask the Experts™
I'd like to prevent certain columns in a datagrid from being included when the user cycles through cells using the tab button (The equivalent of setting the tabstop property to false, but just for an individual column).  Is there any way to do this?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006
Hello Measu,

you could try to set the Column.Locked property, unfortunately if you are tabbing between cells the Tabstop still occurs on the locked column, however, in  the rowcolchange event you can see if you are on that particular cell and  use a SendKeys "{Tab}" thich will tab off of the cell



Thanks Bruintje!
I have used the keypress event and an "if KeyAscii = 9 then..." statement to get control over what has caused the column change and then set the col and row properties to what's required.  Many thanks for the help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial