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

Save state of tree view node expansions to server ?

2 Answers 154 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 09 Mar 2012, 02:38 AM
I want to post back to my server the state of the tree view node expansions.
When the tree view is displayed during a later visit to the page I would like to perform whatever .expand() calls are needed

I suppose the same info could be cookied to handle things on a per visitor basis.

What selectors or traversals would I need to capture such info?

Things would seem a little tricky because the children of node N can be open, and when N is closed those children remain open but not visible.

2 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 2
answered on 07 Mar 2013, 03:25 PM
I know it has been almost a year since you posted this, but I am wondering if you have a solution about saving the tree state.

-john-
0
Vladimir Iliev
Telerik team
answered on 12 Mar 2013, 12:24 PM
Hi Richard,

Basically preserving the TreeView state is not supported out-of-the-box, however colleague of mine Daniel already posted such example solution which use cookies to achieve the desired behavior. I would suggest to use the project as a baseline to implement this functionality in your project.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Richard
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 2
Vladimir Iliev
Telerik team
Share this question
or