Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here




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.

RE: Gridview

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:

DO FORM TheForm WITH Employees.Emp_Code

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

I hope this answers your question.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Gridview

thanks sir :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close