Click here to Skip to main content
15,885,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
My table has 4 columns namely ID,Name,Designation and Reporting Manager.
I need to display the organization tree using 'ul' & 'li' HTML tags.I have to list the data present in table to a organization hierarchy using unordered list from the tabledata in database.
I have to a display the data from database to the organization hierarchy like below one.
XML
<ul >
<li>
<a href="/employee/1/show" title="CEO">Anchal</a>
<small>CEO</small>
<ul >
<li>
<a href="/employee/2/show" title="COO">Anika</a>
<small>COO</small>
<ul >
<li>
<a href="/employee/13/show" title="Accounts Manager">Udit</a>
<small>Accounts Manager</small>
</li>
<li>
<a href="/employee/14/show" title="Business Analyst">Yatiyasa</a>
<small>Business Analyst</small>
</li>
<li>
<a href="/employee/15/show" title="Scrum Master">Zena</a>
<small>Scrum Master</small>
</li>
<li>
<a href="/employee/16/show" title="Head (Quality)">Aahna</a>
<small>Head (Quality)</small>
<ul >
<li>
<a href="/employee/17/show" title="Quality Manager">Yashraj</a>
<small>Quality Manager</small>
<ul >
<li>
<a href="/employee/18/show" title="Tester">Veena</a>
<small>Tester</small>
</li>
<li>
<a href="/employee/19/show" title="Mobile Tester">Torsha</a>
<small>Mobile Tester</small>
</li>
<li>
<a href="/employee/20/show" title="Tester">Ruchita</a>
<small>Tester</small>
</li>
<li>
<a href="/employee/21/show" title="Mobile Tester">Oindrila</a>
<small>Mobile Tester</small>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="/employee/22/show" title="Head (Development)">Madhulika</a>
<small>Head (Development)</small>
<ul >
<li>
<a href="/employee/23/show" title="Developer">Kimaya</a>
<small>Developer</small>
</li>
<li>
<a href="/employee/24/show" title="Developer">Indu</a>
<small>Developer</small>
</li>
<li>
<a href="/employee/25/show" title="Developer">Gayatri</a>
<small>Developer</small>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="/employee/3/show" title="VP Sales">Ashlesha</a>
<small>VP Sales</small>
<ul >
<li>
<a href="/employee/7/show" title="Manager Sales">Hardik</a>
<small>Manager Sales</small>
</li>
</ul>
</li>
<li>
<a href="/employee/4/show" title="VP Marketing">Birju</a>
<small>VP Marketing</small>
<ul >
<li>
<a href="/employee/8/show" title="Manager Marketing">Jaganmay</a>
<small>Manager Marketing</small>
</li>
</ul>
</li>
<li>
<a href="/employee/5/show" title="Head (HR)">Devak</a>
<small>Head (HR)</small>
<ul >
<li>
<a href="/employee/9/show" title="Recruitment Manager">Lakhan</a>
<small>Recruitment Manager</small>
</li>
<li>
<a href="/employee/10/show" title="L&amp;D Manager">Naamdev</a>
<small>L&amp;D Manager</small>
</li>
<li>
<a href="/employee/11/show" title="Facilities">Pradosh</a>
<small>Facilities</small>
</li>
</ul>
</li>
<li>
<a href="/employee/6/show" title="Head (Finance)">Phani</a>
<small>Head (Finance)</small>
</li>
<li>
<a href="/employee/12/show" title="CTO">Sachit</a>
<small>CTO</small>
<ul >
<li>
<a href="/employee/26/show" title="Solution Architect">Ekaa</a>
<small>Solution Architect</small>
</li>
<li>
<a href="/employee/27/show" title="Solution Architect">Chitral</a>
<small>Solution Architect</small>
</li>
</ul>
</li>
</ul>
</li>
</ul>

Thanks in advance.
Posted
Updated 9-Sep-15 1:20am
v3
Comments
Suvabrata Roy 9-Sep-15 8:25am    
do you need any OnDemand load kind of facility?
Member 1097736 9-Sep-15 9:03am    
Yes,when i open the aspx page it must retrieve the data from database and list it hierarchially.
Suvabrata Roy 9-Sep-15 9:07am    
Ok, but what I try to explain using OnDemand is :

Suppose some click on Manager Name then you need to load the child's or its already loaded.
Member 1097736 9-Sep-15 10:14am    
Not required.
Member 1097736 9-Sep-15 10:14am    
not required suvabrata.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900