TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Robert Hurd
NA
1
2.4k
Trouble Building Multilevel TreeView Object Hierarchy
Apr 26 2012 12:50 PM
Hi there,
Firstly thank you for taking the time out to read this post.
I'm having difficulty creating a WPF TreeView Hierarchy object. The object may have many child nodes, which in turn may also have many child nodes. The number of node levels need to be unlimited. Some nodes may have more levels than others.
I've tried creating an example but currently I can only construct a Hierarchy 2 levels deep.
I have attached my source code for the project. All it contains is the treeview control and c# objects, methods and classes for this particular problem.
When you open the source code, open file MainWindow.cs and find the Window_Loaded() method. Within the method you'll notice I'm trying to create a list of items with ID, ParentID & Name. The problem I have is that the items with ID=6 & ID=7 aren't being created when I convert the flat list into an hierarchal object, thus not visible in the treeview control when the ItemSource is set.
Thank you very much for your time. All help is appreciated.
Attachment:
wpfapplication1-2.zip
Reply
Answers (
0
)
Routed event in WPF?
How to get the checked items of checkboxes created dynamically and write that value to a file in WPF?