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

pass expanded/collapse state of treeview between pages

1 Answer 21 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jean-Marc Windholz
Top achievements
Rank 1
Jean-Marc Windholz asked on 01 Apr 2010, 02:04 PM
I have a treeview.
Can I pass his state (expanded or collapse of his nodes) from one page to another?
To be more precise:
page 1 with contain 1 + TreeView1
page 2 with contain 2 + TreeView1

if I open in the page 1 some nodes in TreeView1, when I load the page 2 I want that the same nodes are expanded in my TreeView1.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 02 Apr 2010, 10:02 AM
Hi Jean-Marc Windholz,

You can store the state of the treeview in XML format by using its GetXml() server method. Then on page_load of the second page you can restore the state by using the LoadXml() method.

You can store the xml either in the file system or in the database.

Hope that this will get you started.

All the best,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Jean-Marc Windholz
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or