|
-
Aug 28th, 2014, 01:31 PM
#1
Thread Starter
Hyperactive Member
How to find parent of selected item in TreeView?
Okay, using Windows 7 with VS2012 and .NET 4.5 in a WPF application, I have a multi-level treeview that looks like this:

The TreeView is bound to an observable collection of the codes. What I want SHOULD be simple, but it's not turning out to be so. Let's assume that the user clicks on the "6010F-8P" item... how can I find the parent item ("6015F-00")? The data can be up to four levels deep, and I need to be able to backtrack up the entire chain to find not only the root item, but also each parent along the way.
I have searched and searched, but can't find any way to do this. Is there any way for the TreeView control to do find the parent item of a selected item?
Thanks in advance...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|