Skip to Content
0
Former Member
Nov 23, 2009 at 03:18 PM

Sample code on Tree UI element for the following requirements

35 Views

Hi All

I have populated the Tree UI element as follows as an example

A
 A1
 A2
 A3
B
 B1
 B2
 B3
C
 C1
 C2
 C3
D 
 D1
 D2
 D3	 	

i have the following requirements on Tree UI element

a) How to check or how to write the code to check whether the current selected node is first level or second level or third level etc from the above example tree structure.

b) How to insert a node only at the first level , second level and third level i etc from the above example

c) How to delete only leaf node . i have a requirement which says that i can delete only leaf nodes , if i delete a node which having children then it should not allow to me. i can delete a node which is not having any child

4) How to rename any node, once user selects any node then on click of any button then popup opens which retrieves the current textvalue of a node and user have an inputfield where he enters then on click of save then that new textvalue needs to be updated to the selected tree element

If anybody helps in this regard then it would be great help to me.

Thanks in advance

Regards

Kalki reddy

Edited by: KalkiReddy on Nov 23, 2009 4:18 PM

Edited by: KalkiReddy on Nov 23, 2009 4:19 PM