Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Drill Down in FoxPro Grid

Posted on 2013-12-15
8
Medium Priority
?
1,334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 43

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 1000 total points
ID: 39721207
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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