PDA

View Full Version : how to create a TreeNode in collapsed state



manianprasanna
7 Aug 2007, 7:37 AM
hi all,

First let me explain the situation. I have a tree node say "tn1" and it has some sub nodes say "tn2", tn3", "tn4". Also i have another tree node say "tn5". Now i needs to copy the "tn1" under the "tn5".


ROOT
|
|
---tn1
| |
| ---tn2
| |
| ---tn3
| |
| ---tn4
|
-------tn5

So the new tree will be like this


ROOT
|
|
---tn1
| |
| ---tn2
| |
| ---tn3
| |
| ---tn4
|
-------tn5
|
---tn6
| |
| ---tn7
| |
| ---tn8
| |
| ---tn9


I need the "tn5" node in the collapsed. why means while copying i don't know the id of the newly created nodes. I comes from the database. so i need the newly created node ("tn6") with the plus sign on the left.

Thanks in advance :)