This is a migrated thread and some comments may be shown as answers.

XMLDatasource retain treeview state

3 Answers 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Silver
Top achievements
Rank 1
Silver asked on 31 May 2012, 07:35 PM
HI,

I am using xmldatasource to populate the treeview. Like in the example: http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/xmlfile/defaultcs.aspx 

Only extra property I have in XML node is 'NavigateURL' property. When I click the node it is loading the page specified in the navigateurl, but the treeview is collapsing. How to retain the state in this case?

<Tree>
   <Node Text="Sample" NavigateUrl="~/Sample.aspx" Expanded="False" ></Node>
</Tree>

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Jun 2012, 02:04 PM
Hi Silver,

 
You can refer to this Code Library -Save the expanded state of the TreeNodes when the treeview is being bound upon each Postback where similar functionality is explained.

Hope this will help you.

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Silver
Top achievements
Rank 1
answered on 06 Aug 2012, 07:25 PM
Plamen  

This example is very old.. do you have any updated one? btw, sorry for long delay!
0
Plamen
Telerik team
answered on 09 Aug 2012, 10:45 AM
Hi Silver,

 I have reviewed the example from the Code Library linked in the previous post once again and it worked properly at my side with the latest version of RadTreeView. Please have in mind that it have been updated last year again. If you find some unusual behavior in it please let me know so I can update it again.
   

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Silver
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Silver
Top achievements
Rank 1
Share this question
or