Treeview in asp 2.0 problem

R

Ruszt

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)
 
A

Alex D.

is it the line: this.Label1.Text = DateTime.Now.ToString("G");
after or before your treeview code?
 
R

Ruszt

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
 
A

Alex D.

I guess you can try something like:
this.TreeView1.Nodes.Clear();
and then try and repopulate the tree and see what happens...
 
R

Ruszt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top