Need Help in Populating A Treeview - Thanks

S

Steve Arndt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top