473,769 Members | 5,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save expand state TreeView

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.GetExp andState();
update_treeView ();
treeView.setExp andState(es);

thanks,
RSammut
Nov 16 '05 #1
1 6165
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.GetExp andState();
update_treeView ();
treeView.setExp andState(es);

thanks,
RSammut

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4320
by: Steven | last post by:
Hello, I have a problem in using TreeView. I want to know how the TreeView can automatically Expand a path I have accessed before? I have tried to use "path.Expand()", but it seems no good working. Does anyone can give me any advise or show me somecode for sample?. Thanks.
2
2435
by: Stephen | last post by:
In asp.net 1.1, the IE treeview web control has a property called "SelectExpands" that, when set to true, expands a node when a user clicks the node text. I can't seem to replicate this in the treeview control in .net 2.0. Anyone know of way to expand a node when a users clicks the node text?
4
10140
by: Karim El Jed | last post by:
Hi, I'm trying to expand a special Node of my TreeView from Codebehind. I have a TreeView on a page for navigating to another site. On the other tsite here is the same TreeView more precisely a new TreeView with the same nodes ;) So I would like to keep the expanding state of the first Tree for the second one on the next page. At least the last selected node (path will be saved in query string) should be expanded.
1
2343
by: Edwin Knoppert | last post by:
I'm using a simple treeview for helpsystem. The treeview is on a masterpage, right beside it it has the container. The user uses the treeview to navigate to helppages using this masterpage. But on each page load the treeview nodes are collapsed to original state. 1) I want to maintain the nodes expanded state. 2) I would like to select the node when the node is clicked which results in a page reload. This should re-select the node with...
0
1430
by: Edwin Knoppert | last post by:
I'm using a simple treeview for helpsystem. The treeview is on a masterpage, right beside it it has the container. The user uses the treeview to navigate to helppages using this masterpage. But on each page load the treeview nodes are collapsed to original state. 1) I want to maintain the nodes expanded state. 2) I would like to select the node when the node is clicked which results in a page reload. This should re-select the node with...
0
2558
by: Shadow Lynx | last post by:
When using ASP.NET 2.0's built-in TreeView on a page with <BASE target = "AnythingBut_Self"></BASE> in the HEAD, the expand/collapse buttons fail to function. The reason for this is that the hyperlinks generated for the expand/collapse buttons includes javascript code that will execute in the frame specified in the Base Target rather than the current document. To remedy this, TreeView should render a target="_self" attribute for each...
0
1339
by: Anders | last post by:
Hi I have a singlepage design (non-frame) so the whole page is refreshe on postback. I have a treebiew filled from a site.map. Works fine. But on every postback every single node in the treeview is expanded (!). The desired behavoir would be that i remembered the expand/collaps state on post back. Is that possible?
0
2422
by: jim | last post by:
Hi, I have a TreeView control that sits on the MasterPage. All of my other webpages inherit from that Master Page. The Treeview receives it's data using an XMLDataSource that has it's DataFile property set to the Web.sitemap file. I have turned off the Expand/Collapse icons on the Treeview. I want to be able to single click a node in the tree view to
11
2883
by: Nospam | last post by:
I don't know what it is I am doing wrong, I am trying to get the menus to either expand or contract based on their previous states, i.e if already expanded if clicked again contract, and if contracted, expand, so far it doesn't work for the about and services link(but works for the expand all and contract all links), any help would be greatly appreciated: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.