Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP TreeView - DB Driven 2

Status
Not open for further replies.

saurabh

Programmer
Jul 10, 2000
27
IN
I have a database which has n tier hierarchy eg.

idParent idCategory chrDescription
0 1 A
0 2 B
1 3 C
1 4 D
2 5 E
3 6 F
3 11 cc
3 12 cd
5 9 i
5 10 j
6 7 g
6 13 L
7 8 h

I am trying to implement this structure in a expandable and collapsable treeview - which is generated from the DB when ASP is called.
Any node can have any number of sub-levels or child nodes and the same is true for all the childs.
This has to be implemented without using a component.

If you can send me your email I will send you the code.

Saurabh
 
when you say you can't use a component, does that exclude dhtml as well?

If not, then check out or any of the other host of dhtml sites out there... most of them have tree menu scripts that work great.

:)
Paul Prewett
 
I am looking to do something very similar, I have the data in an Oracle database and I want to create a web based tree navigation showing the hierarchy so that later I can select a component in the hiearchy and force that field to update a web based form.
 
Hello guys


I need some help regarding how to use or integrate the outlook in my asp page, I need to know how to send emails using asp, I used the following codes in my asp, can anybody asset me in the case, I really appreciate it.


set objsendmail=createobject("CDONTS.NewMail")


objsendmail.To ("abdellatif@mail.ru")
objsendmail.From "abdellatif@mail.ru"
objsendmail.Subject "hi"
objsendmail.Body "Test"
objsendmail.Send


best regards.

Abdellatif
 
Something like this...

<TABLE width=690 style=font-family:arial;color:#000080>
<%
' Insert connection string
Set rs= Server.CreateObject(&quot;ADODB.Recordset&quot;)
sql = &quot;SELECT * FROM [table1] order by region, area, storenumber&quot;
rs.Open(sql),connStr
do
response.write &quot;<TR><TD>&quot; & rs(&quot;region&quot;) & &quot;</TD></TR>&quot;
oldRegion=rs(&quot;region&quot;)
do
response.write &quot;<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&quot;& rs(&quot;area&quot;) & &quot;</TD></TR>&quot;
do
response.write &quot;<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; & rs(&quot;storenumber&quot;) & &quot;</TD></TR>&quot;
oldArea=rs(&quot;area&quot;)
rs.movenext
if rs.eof then newArea=0 else newArea=rs(&quot;area&quot;)
loop until oldArea<>newArea or rs.eof
if rs.eof then newRegion=0 else newRegion=rs(&quot;region&quot;)
loop until oldRegion<>newRegion or rs.eof
loop until rs.eof
%>
</TABLE>


I use the same thing using spans and some javascript to dynamically expand and collapse the nodes of the tree.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top