Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Grid Questions

Status
Not open for further replies.

ggrewe

IS-IT--Management
Jul 10, 2001
169
US
I have a couple of questions about using a grid to do some data entry, if anyone can help, I would apreciate it... I am using VFP 7, SP1.

1. My grid has 8 columns, 6 of which can be seen on screen most of the time on an 800x600 setting. When a user tabs past column 6, the grid moves to the right and you can no longer see the first two columns. I would like to split the grid and keep the first two columns visible all the time. When I use the partition property and split the grid, the left panel shows the first two columns, but they also display in the right panel. Can I start the right panel with column 3?

2. When the user tabs out of the last column (#8) in row 1, can I force the cursor to move to column 3 in row 2 instead of coming back to column 1 in row 1?
 
ggrewe

My grid has 8 columns, 6 of which can be seen on screen most of the time on an 800x600 setting. When a user tabs past column 6, the grid moves to the right and you can no longer see the first two columns. I would like to split the grid and keep the first two columns visible all the time.

Take a look at faq184-3477 , with additional code you can freeze the two left-most columns.


When the user tabs out of the last column (#8) in row 1, can I force the cursor to move to column 3 in row 2 instead of coming back to column 1 in row 1?

In the textbox of column8's lostFocus event reset the focus to column3.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks for the FAQ Mike, it works great. But for the second part of my question, I can set the focus to column3, but it does not move down to the next row. Is this possible?
 
Hello ggrewe.

Put this code in the LostFocus() of the text box in column 8 of the grid:

IF INLIST( LASTKEY(), 13, 9, 24 )
KEYBOARD '{DNARROW}'
This.Parent.Parent.column3.SetFocus()
NODEFAULT
ENDIF

Marcia G. Akins
 
Marcia,

Thanks, this works. It does return to the third column, first row and then performs the down arrow. I have code in the lost focus event of that textbox already, so I will modify it not to fire if focus comes from another text box. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top