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!

Enter Data at Grid 1

Status
Not open for further replies.

paispatin

Technical User
Oct 21, 2003
62
A1
Dear all,

Problem 1.
I would like to enter data at a grid. Should I make a dummy table first for a grid recordsource and after that save all data from that dummy table to a real table, or do it have other solution?

Problem 2.
If I use grid to enter the data, if I finish with first line at the grid, how do the cursor move it self to next line for start enter next data?

I use VFP8.
Thank you in advance.
 
paispatin

Problem 1.
I would like to enter data at a grid. Should I make a dummy table first for a grid recordsource and after that save all data from that dummy table to a real table, or do it have other solution?

You might consider using an updatable view instead of a dummy table.

Problem 2.
If I use grid to enter the data, if I finish with first line at the grid, how do the cursor move it self to next line for start enter next data?

Take a look at the AllowAddNew property of the grid in the help file.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Paipatin,

Problem 1: Is there any reason for not using the original physical table as the record source? It seems to me that would be simpler.

Problem 2: Are you saying that you are editing in an existing record, and you want to move to the line below when the user hits Tab in the last field?

If so, put this code in the LostFocus of the Textbox1 within the last column:

KEYBOARD '{DNARROW}'

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
To expand on Mikes(Lewis) suggestion. You might want to use table buffering. Force the user to save after changes have been made. You will need to issue tableupdate(1,.T.)
 
Thank you guys for your help.
Mike Lewis, your suggestion is what I need, thank you very much to solve my problem about grid to next line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top