Solved

Drill Down in FoxPro Grid

Posted on 2013-12-15
8
1,238 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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 42

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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