Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView Control Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
TreeView Control Question
Divers
Thread ID:
01312764
Message ID:
01312764
Vues:
61
I'm adding nodes to a treeview and I'm trying to set the images:
private void _SetupTreeView()
{
    
    TreeNode oRoot = new TreeNode();
    oRoot.Name = "nodRoot";
    oRoot.Text = "Advocate";
    oRoot.ImageKey = "advocate";
    treeView1.Nodes.Add(oRoot);

    TreeNode oNode = new TreeNode();
    oNode.Name = "nodCustomers";
    oNode.Text = "Customers";
    oNode.ImageKey = "customers";
    oRoot.Nodes.Add(oNode);

    oRoot.Expand();

}
This all runs fine, except that when I select the second node, the icon changes to the root node's icon. When I select the root node again, the customer node's icon returns to Customer.

Anyone know what I'm doing wrong here?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Répondre
Fil
Voir

Click here to load this message in the networking platform