2
votes

I have a treeview control on an aspx page. The data comes from database and I bind it to treeview control programmatically. (Parent-Child relationship in database of course)

Well and I added a textbox which I use to add new child under the selected node and it works also good but so as to see the new added node, I have to refresh and page and all the expanded nodes collapses naturally. How can I prevent that. I am also using updatepanel not to refresh whole page and to expand child nodes I am using topicTree_TreeNodePopulate event of course. When users add something under the selected node , without any refreshment or postback the recently added node should be seen right under the selected page.

Thanks in advance..

Btw I haven't much experience on Javascript so I can't do it with javascript.

1
This question has the look of auto-translated text; are you asking how to perserve the expantion of tree-view nodes? - Paul
You made it? Do you mean that you solved your problem? - Rene Saarsoo
yeap :) I solved the problem :) - Tarik
Perhaps you should share how you solved the problem, so others who search on these terms will not be left with an unanswered question. - Godeke

1 Answers

1
votes

You can set the Expand property of TreeNode to "false" at the time of binding Tree View or whenever you are refreshing the TreeView.