Treeview: Move Node in Tree up or Down

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
freeman
Posts: 8
Last visit: Mon May 10, 2021 3:55 am

Treeview: Move Node in Tree up or Down

Post by freeman »

Hello,

What is the most accurate way to move a node up and down with all its subnode in a treeview?
I've one treeview and two buttons "move up" and "move down"

Thanks for help

jvierra
Posts: 14876
Last visit: Fri Jul 30, 2021 8:16 am
Answers: 12
Has voted: 3 times
Been upvoted: 10 times

Re: Treeview: Move Node in Tree up or Down

Post by jvierra »

Here is a quick demo of how to move nodes in a treeview. Select an node and use buttons to move up or down.
Attachments
Demo-TreeviewXML_R3.psf
(28.38 KiB) Downloaded 160 times

User avatar
freeman
Posts: 8
Last visit: Mon May 10, 2021 3:55 am

Re: Treeview: Move Node in Tree up or Down

Post by freeman »

Thanks a lot for the example! :D

Locked