Solved

Drill Down in FoxPro Grid

Posted on 2013-12-15
8
1,132 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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
A procedure for exporting installed hotfix details of remote computers using powershell
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now