From: Jeff Johnson on
"Appr3nt1c3" <guerrero.rey(a)> wrote in message

>> > No idea how to do this. Have a treeview with lots of nodes. Need to
>> > loop
>> > through the nodes, and remove ones (that have a specific tag). That is
>> > easy. But I don't want to remove the nodes under the ones removed. I
>> > want
>> > them to "move up" a notch, and only get deleted if they have a specific
>> > tag. Help! So each node is looked at, but no child nodes are remove
>> > until
>> > it is their turn to be analyzed.
>> Three loops.
>> First, create a List(Of TreeNode). Then loop the entire tree. When you
>> find
>> nodes that you want to delete, add them to the list.
>> Next, iterate the list. The first thing you'll need to do is iterate the
>> children of the active item (third loop) and set their Parent to the
>> Parent
>> of the active item. This moves them "up a notch." Once that's done,
>> delete
>> the node.
> use two treeviews. clear the first one before the loop.
> then add the nodes that you dont want to delete to the new treeview

If you clear the first tree view, where are the nodes supposed to come from
to fill the second?

Regardless, this really sounds like overkill to me.