Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving to a new line in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01123931
Message ID:
01124057
Views:
12
I would say you shouldn't be KEYBOARDing things. That's a bit like calling the Click of a command button. In the LostFocus of the textbox in the last column, call a method called AddLineItem (or whatever) and APPEND BLANK or INSERT INTO. In that method, you'll also use SetFocus to set the focus to the column in question. This is what I do and it works fine. Since I allow the user to also press the down arrow key, I have to determine if my method should add the record or if it's already been added because AllowAddNew is set to True and the user pressed the down arrow on the last record of the grid.

>Hi all,
>
>I've got an order-entry form with the detail information in a grid. I have it set up so that when the user gets to the end of the current detail line, it adds a new detail line to the grid. But for the user to get to that line, they have to tap the down-arrow key. No biggie, but they'd like it to automatically move to that next line and go to the second column in the grid for input.
>
>How do I tell it to move to the next line and position the cursor in a specific column?
>
>Thanks very much!
>
>John
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Reply
Map
View

Click here to load this message in the networking platform