473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 5728
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)
{
restoreMyTreeviewStuff();
}

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)
{
restoreMyTreeviewStuff();
}

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
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...
4
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...
3
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...
7
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...
0
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
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...
26
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...
1
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...
1
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.