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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gridview

Status
Not open for further replies.

RALPH

MIS
Aug 3, 2017
4
PH
How to select data in Gridview and open it in another form. for example
I select employee code 00001 this employee code goes to another form.

please help me sir/ma'am thank you so much.
 
Im not sure what you mean by a "gridview". In VFP, we have a grid control, which shows data from an underlying table in a tabular format. Is that what you are referring to?

If so, then you don't have to do anything special to navigate to the record. As the user moves the highlight in the grid, VFP automatically navigates to the corresponding record in the table.

To pass the data from that record to another form, you use the WITH clause in the DO FORM command.

So, if the grid's underlying table is Employees, and you want to pass Emp_Code field to another form, you just call that form like this:

[tt]DO FORM TheForm WITH Employees.Emp_Code[/tt]

In the Init of the called form, use a LPARAMETER statement to receive the parameter.

I hope this answers your question.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top