469,579 Members | 1,064 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Need Help in Populating A Treeview - Thanks

I'm trying to populate a vb.net treeview using a SQLDataReader at
Treeview1_BeforeExpand.

Basically I have a Treeview with 5 parent nodes and 1 dummy child node per
parent. The first parent node is called Address is the parent I'm trying to
add new children under.

When BeforeExpand is triggered, it removes the dummy child under the Adress
parent node based on e.Node.FirstNode.Remove. Then runs a private sub
called PopulateNode with e.Node as a passed variable (ByVal eNode As
TreeNode).

When PopulateNode is called, the records are pulled in from the database
using the reader. This works fine. But where I have problems is trying to
populate the new children under the parent node "Address". I can't seem to
get the Treeview statement right to add/insert the children under the
"Address" parent.

Any help appreciated.

Thanks


Sep 23 '06 #1
2 3016
I think it would be:

e.node.nodes.add(your child node)
--
Dennis in Houston
"Steve Arndt" wrote:
I'm trying to populate a vb.net treeview using a SQLDataReader at
Treeview1_BeforeExpand.

Basically I have a Treeview with 5 parent nodes and 1 dummy child node per
parent. The first parent node is called Address is the parent I'm trying to
add new children under.

When BeforeExpand is triggered, it removes the dummy child under the Adress
parent node based on e.Node.FirstNode.Remove. Then runs a private sub
called PopulateNode with e.Node as a passed variable (ByVal eNode As
TreeNode).

When PopulateNode is called, the records are pulled in from the database
using the reader. This works fine. But where I have problems is trying to
populate the new children under the parent node "Address". I can't seem to
get the Treeview statement right to add/insert the children under the
"Address" parent.

Any help appreciated.

Thanks


Sep 23 '06 #2
That worked...Thanks

Steve
"Dennis" <De****@discussions.microsoft.comwrote in message
news:58**********************************@microsof t.com...
I think it would be:

e.node.nodes.add(your child node)
--
Dennis in Houston
"Steve Arndt" wrote:
I'm trying to populate a vb.net treeview using a SQLDataReader at
Treeview1_BeforeExpand.

Basically I have a Treeview with 5 parent nodes and 1 dummy child node
per
parent. The first parent node is called Address is the parent I'm trying
to
add new children under.

When BeforeExpand is triggered, it removes the dummy child under the
Adress
parent node based on e.Node.FirstNode.Remove. Then runs a private sub
called PopulateNode with e.Node as a passed variable (ByVal eNode As
TreeNode).

When PopulateNode is called, the records are pulled in from the database
using the reader. This works fine. But where I have problems is trying
to
populate the new children under the parent node "Address". I can't seem
to
get the Treeview statement right to add/insert the children under the
"Address" parent.

Any help appreciated.

Thanks


Sep 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mark Rezansoff | last post: by
reply views Thread by N-Mayne | last post: by
1 post views Thread by naijacoder naijacoder | last post: by
2 posts views Thread by Mike | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.