473,789 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeView populate on demand and mutations after expanding

Hi,

I am using a TreeView in an ASP.NET application where I have my nodes update
on demand. When I expand a node that has no children and then add a child in
my datasource and expand the node again the child node correctly displays. If
I add a second one after expanding it will not show up however. It seems like
there is some kind of cache in the way or something like that.

Is there any way to force a node to repopulate?
Apr 26 '06 #1
2 5746
Sounds like it might be generating a postback. If so, you'll need to use some
method (such as Session or Cache) to store whatever you've added and
reconstitute it after a postback. In Page_Load ,

if(IsPostBack)
{
restoreMyTreevi ewStuff();
}

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Dirk" wrote:
Hi,

I am using a TreeView in an ASP.NET application where I have my nodes update
on demand. When I expand a node that has no children and then add a child in
my datasource and expand the node again the child node correctly displays. If
I add a second one after expanding it will not show up however. It seems like
there is some kind of cache in the way or something like that.

Is there any way to force a node to repopulate?

Apr 26 '06 #2
Unfortunaltely it does not generate a postback anymore once a node has been
expanded once. It just populates it with values it has cached client side.
Basically I need a node to do a postback everytime a node is expanded, not
just once, to cater for data changes.

"Peter Bromberg [C# MVP]" wrote:
Sounds like it might be generating a postback. If so, you'll need to use some
method (such as Session or Cache) to store whatever you've added and
reconstitute it after a postback. In Page_Load ,

if(IsPostBack)
{
restoreMyTreevi ewStuff();
}

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Dirk" wrote:
Hi,

I am using a TreeView in an ASP.NET application where I have my nodes update
on demand. When I expand a node that has no children and then add a child in
my datasource and expand the node again the child node correctly displays. If
I add a second one after expanding it will not show up however. It seems like
there is some kind of cache in the way or something like that.

Is there any way to force a node to repopulate?

Apr 26 '06 #3

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

Similar topics

0
1814
by: Mike Preston | last post by:
Warning - long message. Many thanks for making the A97 version of the treeview w/o activex controls available. I have taken it down a different path and ended up doing almost everything differently. It now has, built in, the ability to have 12 levels, not just 3. The tree's recordsource table (TreeviewRS) is built based on information
4
10142
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.
3
10153
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with that. Im trying for about 3 hours but can't get it to work. Thank you!
7
2838
by: vsiat | last post by:
I am trying to create a treeview out of a database table with the typical structure ID, NAME, PARENTID, TYPE, EXTRA_INFO, where is linked to the . What I want to achieve is create a tree made of custom, extended nodes, which include all the extra information contained in the table and not just typical TreeNode objects. To do that, I first created a structure with all the extra
0
1067
by: Alex D. | last post by:
Does any body knows if when using the treeview populate on demand feature if the whole tree's viewstate is sent back to the server under the hood? Thanks, Alex.
1
4936
by: doemon | last post by:
Hi, I'm working on a pagination control and I need to dynamically rerender a treeview to display the next set of nodes depending on which page we're on. For example, page 1 will dispaly only nodes 1 to 10, but when the user clicks , the tree will display nodes 11 to 20. Page 1 will is loaded when the page that contains the ascx (parent of the treeview) is loaded. This is all cool. The treeview displays correctly. When I click the ...
26
8531
by: JJ | last post by:
Is there any way you can expand a parent node on the treeview control _without a postback_ by clicking on the node text (NOT clicking the expand image URL) ? I want to format the treeview node to look like a column of buttons that expand to show the child nodes (if there are child nodes) qithout a postback. I don't want to display the plus/minus or any other expand/collapse graphic. ?
1
1648
by: Rohit111111 | last post by:
Hello all, I have a treeview control just like windows file structure.I have a treeview control on the left side of page that will populate from database upto n-level,and on click of any node i am showing sub categories and files of selected category from the treenode,and on the right side of page i have a link add category that will redirect the user to new page where user can add new category.and this new category is added in the category...
1
2667
by: Chris | last post by:
Hi- I'm running this database query where the results will be used to populate my treeview. For Each drPA As DataRow In dsMasterList.Tables(0).Rows iRoot = iRoot + 1 nRootNode = New TreeNode(drPA(0), iRoot, "", "", "") nRootNode.SelectAction = TreeNodeSelectAction.Expand tvMasterList.Nodes.Add(nRootNode)
0
9506
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
10193
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...
1
10136
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,...
0
9979
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...
1
7525
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
6761
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
5415
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
4089
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
3
2906
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.