Wednesday, 21 August 2013

Show hierarchy in a table structure

Show hierarchy in a table structure

I am stuck with a situation,where I have a table first I show manager,then
if I click the manger I have to show his corresponding subordinates; if I
click on any subordinates I have to show their multiple projects and so
on. How to achieve this?
I want to achieve this the most dynamic way possible using jQuery. I was
able to do this if I have only one in each level,how to do it if there are
more than many rows at some stage.
Edit:
<table>
<tr class="0"/><td and all data>
<tr class="1"><td and all data>
<tr class="2"><td and all data>
<tr class="3"><td and all data>
</table>
What I did was initially I hide the class 1-3;then when I click 0 I show
class1,then when I click class1 I show class 2 and so on.
But now how to do it if I want to show 2 and 3 at the same time when I
click class 1;and also the no of rows is dynamically populated.

No comments:

Post a Comment