Solved

Drill Down in FoxPro Grid

Posted on 2013-12-15
8
1,198 Views
Last Modified: 2013-12-16
Dear Experts

I'm having Grid object in the form,
which is bound to 3 columns grid column control source from Journal table(dbf)
I want to show some records from Details.dbf underneath each row from Journal table
So I decided to use Drill down( + symbol) to show the data

But dont know how to do this in native FoxPro Grid object

Can you please advice.

Thanks
Simon
0
Comment
Question by:ziorinfo
  • 5
  • 2
8 Comments
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 39720814
In FoxPro the easy and conventional way of doing these things is to have two BROWSE windows below each other. You click on a row in one and the other will reflect on what you clicked. Check SET RELATION and SET SKIP.

If you wish to have them in one BROWSE window then it gets tricky. You will need to create the two tables in one in a SELECT QUERY and have the BROWSE show them in one field/column. The "details" rows should be hidden = true and when you click on a mother row the hidden should be false. The trick is to flag the hidden rows using another ALIAS of the table so that the current record number won't move in the BROWSE window.
0
 

Author Comment

by:ziorinfo
ID: 39720849
Basically, I do not want Browse window, it would be nice if we could figure out in
Visual FoxPro(9) native Grid object.

Something like this
Drill Down Record in Grid
Awaiting yours
thanks
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 39720910
I am terribly sorry. I meant a Grid Control not a BROWSE.

If I were to do it, I would create an HTML file and use it with a WebBrowser control. That's how I did it.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 27

Expert Comment

by:CaptainCyril
ID: 39720913
It will still work as a described above using a Grid. It also depends on the number of columns in both tables. You can concatenate many columns in one using a calculated field.

Example:
ALLTRIM(address1) + ', ' + ALLTRIM(address2) + ', 'ALLTRIM(city) + ', ' + ALLTRIM(country)
0
 
LVL 41

Expert Comment

by:pcelba
ID: 39720943
You could also use Tree view control. See samples in FoxPro Task Pane - Solution Samples - ActiveX controls - Treeview  or  Provide a hierarchical display of items
0
 

Author Comment

by:ziorinfo
ID: 39721164
CaptainCyril

Will u please show some example one to many relationship to render html file in shell.explorer.2 ole control

thanks
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 39721199
I put the detail records in a

<div class="header" onclick="javascript:ShowHideDetails('12345');">...</div>
<div class="details" id="d12345" style="display:none;">...</div>

The main record whose id=12345 triggers the showing and hiding of its detail div.

I also put a searchbox on top to redo the query and render the HTML to be refreshed in the BROWSER.
0
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 500 total points
ID: 39721207
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Activating an OLE Program 10 23
Visual Fox Pro commands 15 46
Fox9 and Windows 8 4 2,975
Fox pro conversion 3 64
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question