Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview to view records in a table?
Message
From
21/02/2002 13:53:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00623277
Message ID:
00623331
Views:
12
>I have an idea. I want to know if this is feasible to do? Before I get too far into it.
>
>I want to use a treeview to view records in a table.
>My table is just like a rolodex file with one rolodex card per person.
>I want three levels in my treeview. Here is an example.
>
>Top level of treeview has
>Fire Stations
>Police Stations
>Hospitals
>
>Next level down in treeview has
>Names of Fire Stations
>Names of Police Stations
>Names of Hospitals
>
>Bottom level of treeview has
>Names of Persons within each Fire Station
>Names of Persons within each Police Station
>Names of Persons within each Hospital
>
>Has anyone tried something like this? Is it difficult to do? I would like to make a form that does this. I would like to get the box with the plus sign in it as in the way the treeview works when using Windows Explorer. Thanks for the advice.

I've worked with a reports dictionary which grouped the reports in a treeview. Not too hard to do, just as long as you avoid rebuilding the treeview too many times - that may be slow. Another hint - since you'd need a way to organize your data in some way, you may want to have all the records in a cursor, pre-sorted in the way things will be in the treeview. I've done this by building an index on a special field, and the code to get this special field was basically assigning one-character keys to the top level records, two-character for the second level etc. So the name of (in your case) third person in the fourth police station would have the key of BDC. I could pull this off because the table didn't get changed too often; you may need a different approach.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform