Skip to Content
0
Aug 11, 2005 at 11:16 AM

Representing a Tree in a table

33 Views

Hello All,

<b>Problem Statement:</b>

I have created view context node/attribute hierarchy as:

SomeRootNode
           ->GrandFather
                      ->Father
                             ->Child
                                   ->childName
                             ->fathersName
                      ->grandFatherName

Here grandFatherName, fatherName & childName are attributes of type String.

I have created the elements dynamically which represents a tree hierarchy as:

GrandFather Elements(assigned to SomeRootNode)                Dasharath

Father Elements (child of Dasharath)              Ram Laxman Bharath Shatrughan
Child Elements (child of Ram)                   Luv  Kush

<b>I do not want to use tree UI element for some reasons.</b> I want to represent this info in a Dynamically created table as

<b>Initial Appearance:</b>

<b>GrandFather</b>
Dashrath

Now on click on '<b>Dashrath</b>'

<b>Second Appearance:</b>

<b>GrandFather    Father</b>
Dashrath       
               Ram
               Laxman
               Bharath
               Shatrughan

And finally on clicking '<b>Ram</b>'

<b>Final Appearance:</b>

<b>GrandFather    Father       Child  </b>
Dashrath       
                  Ram         
                             Luv                   
                             Kush  
                  Laxman
                  Bharath
                  Shatrughan

This way i want to use table as a Tree structure. I hope you can visualize the tree.

<b>What i have done till now:</b>

Have created and populated view context structure.

Have created a table dynamically.

Have created an action and associated it to onLeadSelect event.

<b>How to create UI columns, captions etc dynamically ?

How to write the associated action ? [i need code :-)]

</b>

Regards,

Aayush