Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top