?
Solved

Drill Down in FoxPro Grid

Posted on 2013-12-15
8
Medium Priority
?
1,296 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
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 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