473,753 Members | 7,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retain treeview state during navigation

We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redire ct).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
Pål Andreassen
ne**@codroe.com
Mar 10 '06 #1
4 2616
DWS
What does "turing navigation" mean?
What does tree Initialization mean?

Thanks
DWS
"PÃ¥l Andreassen" wrote:
We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redire ct).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
PÃ¥l Andreassen
ne**@codroe.com

Mar 10 '06 #2
I have just discovered this very same problem 2 hours ago.

The treeview works fine for browsing (expanding / contracting nodes) however
when transfer to a new page occurs the treeview is completely reset to its
original state.

I need it to maintain the users selection of expanded and contracted nodes.

Is this a bug with the treeview control ????
"PÃ¥l Andreassen" wrote:
We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redire ct).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
PÃ¥l Andreassen
ne**@codroe.com

Mar 10 '06 #3
=?Utf-8?B?RFdT?= <DW*@discussion s.microsoft.com > wrote in
news:16******** *************** ***********@mic rosoft.com:
What does "turing navigation" mean?
What does tree Initialization mean?


Sorry, that should have been "during navigation".

As for tree initialization I mean the process of figuring out which nodes
should be in the tree. That is dependant on the logged-in users rights, the
context, what applications are installed and so on.

--
Pål Andreassen
ne**@codroe.com
Mar 13 '06 #4
=?Utf-8?B?ZGV3ZXlkb2c =?= <de******@discu ssions.microsof t.com> wrote in
news:E0******** *************** ***********@mic rosoft.com:
I have just discovered this very same problem 2 hours ago.

The treeview works fine for browsing (expanding / contracting nodes)
however when transfer to a new page occurs the treeview is completely
reset to its original state.

I need it to maintain the users selection of expanded and contracted
nodes.

Is this a bug with the treeview control ????


So, this is a consequence of how web controls store state in the VIEWSTATE
during postsbacks. When a navigation occurs (a redirect / normal GET
request) to a "new" page/URL there is no viewstate and hence the tree
looses it's state. Remember that webpages are essentially state-less. What
we are trying is to implement state accross multiple pages, and there
normally where Session (or querystrings) come to the rescue.

--
Pål Andreassen
ne**@codroe.com
Mar 13 '06 #5

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

Similar topics

42
11549
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
1
6165
by: R. Sammut | last post by:
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?
0
464
by: xzzy | last post by:
I am using www.obout.com 's treeview control and their postback dll ( for an aspx web page ). The treeview and no postback works, BUT the postback dll keeps getting removed from the solution. No problems with any of the other dlls in the app. I have asked www.obout.com about this but they do not know. How do I prevent the DLL from getting removed from the solution?? or please recommend a treeview that I can expand and collapse...
2
1782
by: damiensawyer | last post by:
Hello all, I'm wondering if someone can help me with an issue. I have a master page that has a treeview control on it (inside an ascx file). Also on the master page I have a content placeholder which contains the various pages of my application. I wish to have the treeview control displayed at all times during the application.
6
11683
by: cyriel1920 | last post by:
Hi, I use the selectednodestyle with a white background so the user can see which item was chosen in the treeview navigation. The nodes have a navigateURL with a target to another frame. Navigating works with no postback and the style follow the selected node. When a new child is added to a node there is a button to refresh the node. This is done by a postback. After this postback the selected node stays keeps the selected style.
0
1581
by: uncensored | last post by:
Hi, Sort of new with the whole treeview control and I was wondering is there a way to build a treeview menu using my SQL data I pull from a database instead of having to hard code it into the webpage. Pasted below is my current code but what I would like to do is instead make a table in SQL that data can be added or modified to and have it generate the menu according to the data instead. Thanks for the help, Mike <mytree:treeview...
1
2183
by: lior | last post by:
Hello, I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database. Is there any simple method of maintaining the expanded / collapsed
1
3602
by: Nikron | last post by:
Hi, I'm having an issue with the ASP.NET 2.0 Treeview control and persisting its' state accross requests. My Control is embedded within a master page and is used for site navigation. My problem is that the user wants to know which page they are currently on and therefore I need to highlight the selected node. The problem is I lose state whenever the user selects a node and is redirected to another page. Thanks in advance
0
1312
by: vingomail | last post by:
Good Morning, I have two site map: "common.sitemap, loginuser.sitemap", two master page:" common.master, loginuser.master", in common.master, there is a Navigation control: TreeView TreeView--- Sitemapdatasource---common.sitemap in Loginuser.master, there is another Navigation control: TreeView TreeView---sitemapdatasource---loginuser.sitemap
0
8896
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
9451
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9333
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6869
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
6151
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();...
1
3395
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
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2284
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.