By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,543 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,543 IT Pros & Developers. It's quick & easy.

Save expand state TreeView

P: n/a
Hi,

I have a treeview control that is updated every 30 seconds. The
treeview nodes are cleared and new nodes (same number of nodes and
hierarchy) are added to the treeview. Now I need to save the state of
the expanded treeview so that I can apply the same expanded state to
the updated treeview.

is there something i can do?

for e.g. something like

ExpandState es = treeView.GetExpandState();
update_treeView();
treeView.setExpandState(es);

thanks,
RSammut
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Why dont u generate an xml representation of the nodes and store it in an
xml file. You can then rebuild the tree from the xml. Perhaps creating an
abstraction for import / export would be good.
HTH
Ashish

"R. Sammut" <rs**@postmark.net> wrote in message
news:a6**********************@posting.google.com.. .
Hi,

I have a treeview control that is updated every 30 seconds. The
treeview nodes are cleared and new nodes (same number of nodes and
hierarchy) are added to the treeview. Now I need to save the state of
the expanded treeview so that I can apply the same expanded state to
the updated treeview.

is there something i can do?

for e.g. something like

ExpandState es = treeView.GetExpandState();
update_treeView();
treeView.setExpandState(es);

thanks,
RSammut

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.