index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: tree-view in asp :: (3)Post a New Message | Post a Reply
Feb 3 2006, 2:46 AM
 tree-view in aspPost a Reply
 wagae

View this author's profile Send this author a private message

since: Feb 3, 2006
from: JHB,SA

Hi, i have results from the database which i want to display in a tree- like view in asp.

A simple example
Database results:
ID                 NOTE           DESCRIPTION
4    0001      times                              
3    0500      times                              
2    0530      times                  
1    0537      Another one                
0    0537      Another two                    
4    1000      Another three                    
3    1300      another                              
2    1350      another
1    1357      special another                  
0    1357      testing                        
0    1357      testing1              
3    1700      testing2                        
2    1750      testing3                    
1    1757      testing4

On the asp page, i would like to display this results in a tree-like view
For Example,

times       (id=4)                        
times                              
    times                  
      Another one                
      Another two    
Please help.




Feb 3 2006, 6:15 AM
 Re: tree-view in aspPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

First of all your table design is a bit confusing becase
- your ID field is not unique.
- your Note field seems to be numeric

In order to load your treeview from a database table, the table must contain the following fields:
MenuID, Text, URL, ToolTip & ParentID
Where MenuID is a unique identification field and ParentID is the MenuID of the current items parent. e.g.


MenuID  Text     URL           ToolTip  ParentID

0001       Page1   page1.htm   Page 1    000
0002       Page2   page2.htm   Page 2    001
0003       Page3   page3.htm   Page 3    001
0004       Page4   page4.htm   Page 4    003


For more information check the online documentation: Loading from a Database





-------------------------
Ghost
Feb 9 2006, 12:37 AM
 Re: tree-view in aspPost a Reply
 wagae

View this author's profile Send this author a private message

since: Feb 3, 2006
from: JHB,SA

Hi Ghost
Thank you for the reply,
Maybe i didn't explain it properly, in my table for example, parents will have the same id, meaning i need to display the top nodes,Parents(id4) and inside display kids,etc. I dont know if this makes sense.


Pages: (1)   [1]

search this forum: