Last post Dec 30, 2005 02:01 AM by usamaalam
Nov 28, 2005 06:50 AM|usamaalam|LINK
Dec 29, 2005 04:26 PM|saborchulo|LINK
If you ever find an answer to this please let me know.
I have a master page with a tree view, and the treeview does not maintain its state.
I have read others here posting about binding to a site map but I use the
OnTreeNodePopulate event to read the all the files and directories and create the nodes accordingly on the fly. The nodes all have a navigate url property that takes them to an overloaded default page that reads
all the files and displays them in a nice table. That page uses the same master page but the tree view collapses again as originally rendered.
I think you loose the ability to have the tree automagically retain its state when you populate it dynamically, is the only alternative to create another control that derives from TreeView and save it using Control State?
Dec 30, 2005 02:01 AM|usamaalam|LINK
Yes, I have resolved the problem. I passed the selected node index to the same page in querystring variable. But because of this issue, I didnt submitted my form, rather I redirected it to itself. If you are submitting your form, then
you can store SelectedIndex somewhere such as static member of a class.
Hope this will also work for you.