Could you please provide me a code sample showing how to load a treelistview from database​ with hardcoded root nodes on treelistview.

I have shared the link below of a sample preview of the tree I am in need of. Rootnodes are hardcoded and I want the child nodes to be populated from a database.


Please shed some light here.


Recommended Answers

All 2 Replies

if the nodes are hardcoded. For instance there are 3 hardcoded nodes and you need to reference them and add childnodes to them you can simply do treeView1.Nodes[Index of the Hardcoded node [0]/[2]/[3] etc..].Nodes.Add("This will be your database value");


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.