there is nothing that is called "node" hence i can't do
node.name = "hello";
i have already tried this, thats why i'm asking here because i've tried everything that i knew.
If the control exists at runtime, you can access its properties.
So somewhere in your code you create all these dynamic contols, after that, you can go:
- Controls["controlName"].Text = "Display Text";
Whether you create the TreeView at runtime or not, you should have given it a name:
you can then loop through all your dynamically created nodes which live in this TreeView and access the "Text" property of the appropriate one:
- foreach (TreeNode node in TreeView1.Nodes)
-
{
-
if(node.Tag.Equals(somevalue))
-
{
-
node.Text = "New Value";
-
}
-
}
You need to give some sort of unique value to each node you create, something meaningful which you can access, otherwise there is no way for you to distinguish between the nodes.
Good luck, hope this was helpful