473,388 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

rename treeview node children

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!

Feb 15 '07 #1
5 4125
On Feb 15, 11:30 pm, "Adam Sandler" <cor...@excite.comwrote:
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

Feb 15 '07 #2
On Feb 15, 4:38 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
>
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)?

Feb 16 '07 #3
On Feb 17, 12:18 am, "Adam Sandler" <cor...@excite.comwrote:
On Feb 15, 4:38 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
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)?
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

Feb 16 '07 #4
On Feb 16, 11:42 am, "Masudur" <munn...@gmail.comwrote:
"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!

Feb 16 '07 #5
On Feb 16, 7:18 pm, "Adam Sandler" <cor...@excite.comwrote:
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

Feb 17 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Saradhi | last post by:
Hi All, Here I am facing a performance problem with the TreeView Node renaming. I am displaying a hierarchy Data in a treeview in my Windows C# Application. My tree view represents an...
3
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with...
8
by: Don Wash | last post by:
Hi There! I'm using VB.NET to create a TreeView application and unfortunately I could not find "Key" property in Node items of the TreeView. We used to have "Key" property in TreeView node...
12
by: Bob Hollness | last post by:
Hi. I have a text file containing a list of files and their path. I.e. c:\MyDocs\File1.txt c:\MyDocs\File2.txt c:\MyDocs\File3.txt c:\MyDocs\File4.txt C:\MyDocs\Folder\File1.txt
2
by: Jack | last post by:
Hello, I am trying use a TreeView with checkboxes. I would like to check more than one node and allow all child nodes of selected nodes to be checked or unchecked with the parent is checked. ...
7
by: tman | last post by:
I am generating a very large tree list in my program and while it's performance is great once loaded it takes a really long time to load. I create a root TreeNode "offline" and go through the...
1
by: JRSofty | last post by:
Hi everyone, I've gotten myself is bit of a mess where I'm loading a treeview. Basically I initialize the treeview control with a single root node we'll call it root. I do this by using the...
2
by: =?Utf-8?B?QU5V?= | last post by:
I have a tree view which i load completely at the time of my webpage load. When i click on the + signs of the parent nodes, it expands to show all of its children. Similarly, when i click on the...
4
by: ohad weiss | last post by:
Hi all I have a question abount renaming a selected treenode. My user can place the cursor on a treeview, click on the right button of the mouse, and a contextmenue is beeing populated, in which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.