Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

TreeView, TreeViewItem

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 08-02-2007   #1 (permalink)
knallkopf66
Guest


 

TreeView, TreeViewItem

hi,

how can i loose a TreeViewItem from its parent TreeViewItem, so that i
can shift it to another parent?

thanks, k.

My System SpecsSystem Spec
Old 08-16-2007   #2 (permalink)
Mark Moeykens
Guest


 

RE: TreeView, TreeViewItem

I think what you'd have to do is:

1. Loop through your TreeView and find the item you want to detach/remove
and save it to a variable (for example: tviSavedItem).
2. Then remove it from it's current parent's Items collection.
3. Loop through the TreeView again to find the new parent.
4. Then add tviSavedItem to your new parent's Item collection using the
Item.Add method.



"knallkopf66" wrote:

> hi,
>
> how can i loose a TreeViewItem from its parent TreeViewItem, so that i
> can shift it to another parent?
>
> thanks, k.
>

My System SpecsSystem Spec
Closed Thread
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the Parent of a TreeViewItem in a treeview when using HierchicalDataTemplate ? Pon Avalon 1 04-05-2007 03:16 AM
Databound treeview and selectedItem cast to Treeviewitem cheesetarmac Avalon 2 11-14-2006 03:43 AM
Drag and Drop Treeview Items between 2 Treeview ProjectGKR Avalon 3 03-14-2006 07:29 AM
Remove / replace the collapser on a TreeViewItem? Chris Sammis Avalon 3 03-10-2006 04:20 AM
Select hidden treeviewitem in databound treeview RyanLeeSchneider Avalon 0 01-31-2006 06:59 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51