473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Hierarchical listings

I have need to show a list of areas indented hierarchically on an ASP web
page like the following example.

The World
Europe
United Kingdom
England
Wales
Scotland
Northern Ireland
France
Germany
The Americas
North America
State 1
State 2
South America
Columbia
...

The data is held in a database table which has 3 fields (areaID, area,
subAreaOf). The data from the above example would be as follows.

areaID area subAreaOf
1 The World
2 Europe 1
3 United Kingdom 2
4 England 3
5 Scotland 3
6 Wales 3
......You get the idea...

Any idea how to generate the indented listings as economically as possible
on the queries.

Thanks,

Sam
Jul 19 '05 #1
2 1484
Sam,

While I don't have the exact code, you might want to look at some recursive
code. Perhaps a code on threaded discussions should help you.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Sam Churchill" <ng*@samchurchill.co.uk> wrote in message
news:D4*********************@wards.force9.net...
I have need to show a list of areas indented hierarchically on an ASP web
page like the following example.

The World
Europe
United Kingdom
England
Wales
Scotland
Northern Ireland
France
Germany
The Americas
North America
State 1
State 2
South America
Columbia
...

The data is held in a database table which has 3 fields (areaID, area,
subAreaOf). The data from the above example would be as follows.

areaID area subAreaOf
1 The World
2 Europe 1
3 United Kingdom 2
4 England 3
5 Scotland 3
6 Wales 3
.....You get the idea...

Any idea how to generate the indented listings as economically as possible
on the queries.

Thanks,

Sam

Jul 19 '05 #2
my tree code does exactly what your asking for:
http://www.braincast.nl/?deeplink=dhtml/asptree

click view and look at the 'simple' version, you can download
a zip file with all the samples...

http://www.braincast.nl/dhtml/asptree/files/tree.asp
"Sam Churchill" <ng*@samchurchill.co.uk> wrote in message
news:D4*********************@wards.force9.net...
I have need to show a list of areas indented hierarchically on an ASP web
page like the following example.

The World
Europe
United Kingdom
England
Wales
Scotland
Northern Ireland
France
Germany
The Americas
North America
State 1
State 2
South America
Columbia
...

The data is held in a database table which has 3 fields (areaID, area,
subAreaOf). The data from the above example would be as follows.

areaID area subAreaOf
1 The World
2 Europe 1
3 United Kingdom 2
4 England 3
5 Scotland 3
6 Wales 3
.....You get the idea...

Any idea how to generate the indented listings as economically as possible
on the queries.

Thanks,

Sam

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Reimar Bauer | last post by:
Hi all, I would like to use a hierarchical group oriented encryption. Is there something implemented or did you know something I could use? For explanaition. If you have a large building...
4
by: Erik Lechak | last post by:
Hello all, Is there anyone out there that has written anything in python to download tv listings (no XML)? All the tv listing stuff that I can find is way too complex for my taste (includes...
1
by: ALEX KLEIN | last post by:
I want to use fabricated hierarchical recordset in VB6 using ADO. I wrote code like dim rs as adodb.recordest set rs=new adodb.recordest rs.fields.append "a1",adChar,30 Then in loop I put...
3
by: Cláudia Morgado | last post by:
Hello! Oracle has the option with the SQL CONECT BY statement to run through a hierarchical database with a single SQl-statement: <!--SQL SELECT ms_id,ms_parent FROM messages CONNECT BY PRIOR...
4
by: Daisy | last post by:
Let's say I've got a forum, where users can be moderators of each forum. Tables look like this: USER -------- user_key name FORUM
5
by: clintonG | last post by:
I'm looking for documentation and would not turn my nose up to any code from anybody who thinks they are good at the design of an algorythm that can be used to generated a hierarchical relational...
3
by: Bennett Haselton | last post by:
I want to display a hierarchical listing of items from a database table, where, say, each row in the table has an "ID" field and a "parent_id" field giving the ID of its parent (NULL if it's at the...
4
by: Name Withheld | last post by:
OK i know this is a 101 question but... ASP.NET/VB.NET ListingItems() as string I need a nested array of Listings().ListingItems() so i can read a text file and split each line and insert...
7
by: samatair | last post by:
I need to change an existing listings page with pagination. Each page shows 10 listings and they are ordered by the date they are added to the site. Now recently added listings show up in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.