I Want TAB-key to out of datagrid and go to next control

C

chreo

I assume that it is not hard problem.

I would like user to only click in datagrid to select whole row - DONE
I would like user to select whole row using UP and DOWN arrows. - DONE.

And I would like to move to the next control with TAB key!
TAB key in datagrid moves between colums...
I don't TAB do change colums - I want TAB to move to next control - or
previous with SHIFT+TAB...

I think it is not easy problem :(
 
C

Chris

I think this should do the trick.

1. Set the Form.Keypreview to true
2. Capture the Tab key in the keypress event of the form.
3. If Tab key pressed and DataGrid has focus, move the next control.

There is a way to move the next control in the tab order using a function,
but I can't recall what it is off the top of my head. Hope this helps.

Chris
 
C

chreo

If e.KeyCode = Keys.Tab and dgrPaczki.focused

then move to text control?

But...datagrid.focused is error : -(
 
C

chreo

:-(
How is it posiible that since so many years nobody found out how to use
datagrid like...for example listbox.

TAB ---> I am in datagrid
UP,DOWN ---> Move beteween rows (full row selected)
TAB ---> Leave datagrid and go to next control

Sounds easy but nobody can solve that problem.
I found some solution to select full row (by mouse and by arrows UP, DOWN)
But no solution to leave datagrid with TAB.
TAB leaves current cell and go to next cell in datagrid but
I want that key to leave datagrid!!! wrrrrr... :)
 
C

Chris

isn't it dgrPaczki.focus not focused?

Chris
chreo said:
If e.KeyCode = Keys.Tab and dgrPaczki.focused

then move to text control?

But...datagrid.focused is error : -(
 

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