rename treeview node children

  • Thread starter Thread starter Adam Sandler
  • Start date Start date
A

Adam Sandler

Hello,

I have a treeview with a node where the children are read/populated
directly from a database. Some of the text which comes from this
database isn't always user friendly. I'd like to change the some of
the text.

But I don't see any members which represent a collection of items
underneath a given node. So, if I'm looking at something like this on
the screen:

--MapItems
|--roads
|--lakes
|--borders
|--rivers

TreeView1.Nodes.Count only returns 1... how can I get a hold of the
stuff belonging to a node so the text can be edited?

Thanks!
 
Hello,

I have a treeview with a node where the children are read/populated
directly from a database. Some of the text which comes from this
database isn't always user friendly. I'd like to change the some of
the text.

But I don't see any members which represent a collection of items
underneath a given node. So, if I'm looking at something like this on
the screen:

--MapItems
|--roads
|--lakes
|--borders
|--rivers

TreeView1.Nodes.Count only returns 1... how can I get a hold of the
stuff belonging to a node so the text can be edited?

Thanks!

Do you mean you need the text of node, like this:

TreeView1.Nodes(0).Text

?

To enumerate:

For i = 1 To TreeView1.Nodes.Count
....
Next
 
Do you mean you need the text of node, like this:

TreeView1.Nodes(0).Text

Not quite... I'm talking about the stuff underneath the node. Using
my example from the first post TreeView1.Nodes(0).Text is MapItems.
How do I get visibility of or rename the cascaded items (roads, lakes,
borders, rivers) which appear under the node (MapItems)?
 
Not quite... I'm talking about the stuff underneath the node. Using
my example from the first post TreeView1.Nodes(0).Text is MapItems.
How do I get visibility of or rename the cascaded items (roads, lakes,
borders, rivers) which appear under the node (MapItems)?

Hi,

"TreeView1.Nodes[0].ChieldNodes" will do your job,,,,
before using it please check the Check the count of clieldnode
collection
TreeView1.Nodes[0].ChieldNodes.Count

Thanks
Masudur
www.kaz.com.bd
www.munnacs.blogspot.com
 
"TreeView1.Nodes[0].ChieldNodes" will do your job,,,,

There's no ChildNodes property showing up in intellisense. I can do
TreeView1.Nodes[0].Nodes -- which is useless, but there is no
ChildNodes visible.

Thanks!
 
Not quite... I'm talking about the stuff underneath the node. Using
my example from the first post TreeView1.Nodes(0).Text is MapItems.
How do I get visibility of or rename the cascaded items (roads, lakes,
borders, rivers) which appear under the node (MapItems)?

TreeView1.Nodes(0).Nodes(0).Text
 
Back
Top