TAB (key) to next control instead of next column (in datagrid)

C

chreo

Hello.

I have datagrid.
I found code to select all row in data grid (by mouse or arrow keys).
This works great - user can select row and...

....and I want to go to next control.

For example:
User writes something in textbox - then hits TAB to go to datagrid...
....in data grid user choose row by arrows (up and down) and he want to go to
next control (for example combobox)...
....user hits TAB but it comes to next column in datagrid...

WHAT SHOULD I DO TO GO OUT FROM DATAGRID WITH TAB KEY?

I have tried to use keypress or something like that, but:
-maybe I did it wrong (then please show short code how to do that)
-or maybe DATAGRID.KEYPRESSED doesn't work when I have some cell selected...
....I don't know how to explain what am I talking about...
is it possible that CELLS in DATAGRID are like little controls? and when I
press TAB in datagrid then I press TAB in cell not in datagrid?

I want use all datagrid like one big control (like big listbox for example)
:
previous control --> TAB --> DATAGRID --> TAB --> next control
 
G

glennTK

Hi,

If you type the datagrid name in code, put the period after it and hit
CTRL-SPACE to get your options dropdown menu, there is a method which allows
you to jump to the next control. It is labeled "SelectNextControl".
Capture the keyboard input in the Datagrid control such that when one
presses the TAB key, you fire the method I just showed.

eg: DataGrid1.SelectNextControl()

Fire that method on the TAB key capture.

Hope this helps...

Glenn
 
G

glennTK

Hi,
Even better yet, I've since noticed that as parameters of the
"SelectNextControl" you specify that you desire it to be fired on TAB as one
option. You also specify which control to go to next as the first
parameter.

Simply read the parameter list for the "SelectNextControl" method and you
will see where you specify the next control to go to and the key or
condition of which to go to the specified control.

Helpful? Hopefully!
Glenn
 

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