473,326 Members | 2,013 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,326 software developers and data experts.

Treeview in asp 2.0 problem

hello,
i've placed the code below in onLoad event of my page, which should fill in
Treeview control called TreeViewCategories with nodes from XmlDataSource

XmlDataSource xds = new XmlDataSource();
xds.Data = xmlCategories.GetAllCategories().InnerXml;
this.TreeViewCategories.DataSource = xds;
this.TreeViewCategories.DataBind();

but sth strange happens to it...
the content of treeview control stays the same even if xds contains new data
(i've checked it with debugger) the only solution i've found is to rebuild
all the website

another code:
this.Label1.Text = DateTime.Now.ToString("G");

works fine and label changes its value everytime I recall the page

any advices?

(sorry for my English)

Dec 21 '05 #1
4 1174
is it the line: this.Label1.Text = DateTime.Now.ToString("G");
after or before your treeview code?

"Ruszt" <xx*@xxx.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
hello,
i've placed the code below in onLoad event of my page, which should fill
in Treeview control called TreeViewCategories with nodes from
XmlDataSource

XmlDataSource xds = new XmlDataSource();
xds.Data = xmlCategories.GetAllCategories().InnerXml;
this.TreeViewCategories.DataSource = xds;
this.TreeViewCategories.DataBind();

but sth strange happens to it...
the content of treeview control stays the same even if xds contains new
data (i've checked it with debugger) the only solution i've found is to
rebuild all the website

another code:
this.Label1.Text = DateTime.Now.ToString("G");

works fine and label changes its value everytime I recall the page

any advices?

(sorry for my English)

Dec 21 '05 #2
> is it the line: this.Label1.Text = DateTime.Now.ToString("G");
after or before your treeview code?


label code is after the treeview code in the same event - onLoad
Dec 21 '05 #3
I guess you can try something like:
this.TreeView1.Nodes.Clear();
and then try and repopulate the tree and see what happens...

"Ruszt" <xx*@xxx.net> wrote in message
news:e4**************@tk2msftngp13.phx.gbl...
is it the line: this.Label1.Text = DateTime.Now.ToString("G");
after or before your treeview code?


label code is after the treeview code in the same event - onLoad

Dec 21 '05 #4
>I guess you can try something like:
this.TreeView1.Nodes.Clear();
and then try and repopulate the tree and see what happens...


no results - I've also tried this
Dec 22 '05 #5

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

Similar topics

4
by: Ian Powell | last post by:
Hi I've got objects in an sorted ArrayList like: P:\ P:\\DOCS P:\\i386 P:\\i386\ASMS P:\\i386\ASMS\1000 P:\\i386\ASMS\1000\MSFT
0
by: Björn Bengtsson | last post by:
Hello! I have an urgent problem concerning ASP.NET, ADO.NET, SQL Server, XML and the TreeView control. I have two tables; one describing the products and one describing their relationships. A...
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...
14
by: Evan Kontos | last post by:
I am trying to implement a Treeview w/an XML file and I even copied and pasted examples from MSDN but can't get them to work. Any suggestions welcome. XML File <TREENODES> <TREENODE...
4
by: Jeff Beem | last post by:
I have a class that inherits from TreeView. The treeview has tooltips for the nodes but they're showing up behind the form. Has anyone seen this? Are there any known fixes? Thanks in advance,...
3
by: christof | last post by:
I've got a really easy problem, please help me: There are two pages in one I'm creating a TreeView like that: TreeView dbTree = new TreeView(); TreeNode dbTreeRoot = new TreeNode("Root");...
3
by: William Sullivan | last post by:
I desperately want to replace my hand-made ajax treeview with the 2.0 TreeView. The webpage I'm designing uses the postbacks to dynamically fill the treeview. The reason why I'm doing this is...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
1
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...
0
by: bsturg21 | last post by:
Hello, I have an app that has a custom treeview which inherits the base treeview class and I am having a problem with the way the treeview is being redrawn. Each node in the treeview represents a...
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
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.