TreeView and not being able to do things progammatically

L

Luis Ferrao

Hi,

I've been working with a treeview for quite a while now.
Yersterday I decided to add some icons using the treenodetype property.

I created three treenodetypes programmatically in the code behind and
added them to the treenodetypes of the tree, no problem.

I added a small "childtype = sometype" to the treeview directly in the
asp code, and all my treenodes displayed the correct icons, again, no
problem.

Then I removed the "childtype" thing from the asp code and added a
programmatically defined type to each node, since each of them is
created and added to the tree programmatically.

Basically I just added a <newNode.Type = "sometype";> somewhere among
the lines:
TreeNode newNode = new TreeNode();
newNode.Text = "some text";
myRootNode.Add(newNode);

The problem is, the nodes are still created perfectly with their text
value perfectly set, but no type whatsoever is defined or outputed, and
no errors are thrown either.

Why in the name of all that is holy is ASP.NET ignoring my code? What
have I done?

This is very annoying. Thanks for any help.

Luis
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top