lily1987
lily1987

Reputation:

WPF- Treeview--How to add child nodes

i wanna populate treeview from database. i have a table named Topics.

1.topicid 2.topicname 3.parentid

i am using access database. can anyone help me?

Upvotes: 0

Views: 942

Answers (1)

Anderson Imes
Anderson Imes

Reputation: 25650

What you are looking for is a "HierarchicalDataTemplate" to use with your collection. I agree with one of the commenters that your question is too general and feels like you need to take your own stab at this question first, but I'll point you in the right direction of a sample: http://karlshifflett.wordpress.com/2007/11/10/over-reaction-to-a-simple-wpf-explorer-tree/

Hope this helps.

Upvotes: 1

Related Questions