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

Pure client-side treeview state persistance

3 Answers 66 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 25 Nov 2009, 05:31 PM
Hi,

I am trying to persist a treeview's state purely using client side code
I am currently trying to use get_clientState & set_clientState and saveClientState & updateClientState, but with little success.

Currently all nodes are loaded via webservice (MVC) and use checkboxes

Do you have suggestions on the best way to accomplish this?

Thanks

3 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 01 Dec 2009, 03:48 PM
Hello Jonathan,

I am not sure exactly what you mean by 'state', but you can always iterate over all nodes and check whether they are checked, expanded etc. and you can store this info with the approaching planning to use. Later you can use the same information to set the same states back to the nodes.

Kind regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Edward
Top achievements
Rank 1
answered on 25 Aug 2011, 02:16 AM
Just to continue, currently new nodes are loaded on demand through a WebService. Upon clicking a button, information from this tree is used on the server side (through an ajaxrequest), but the new nodes aren't showing up, even with an updateClientState() call on client-side.

Any suggestions? 
0
Plamen
Telerik team
answered on 30 Aug 2011, 11:34 AM
Hi Edward,

The experienced behavior is the expected one since you are using the WebService Load on Demand. Please refer to the following help topic for more information. 

Regards,
Plamen Zdravkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Edward
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or