I'm adding a parent node to a treeview and then adding others, but I want to make sure that the first parent node added will stay last in the tree. How can I accomplish this?
Printable View
I'm adding a parent node to a treeview and then adding others, but I want to make sure that the first parent node added will stay last in the tree. How can I accomplish this?
use the index property on the parent node
Remember that a treeview has a root node as well
make sure you are not setting the first parent as the root
???
Just add that node last with the root as its parent. Add the other nodes you want first.
Dude, I need that node to be added first.
I think you'd have to save the node and then keep adding and deleting it to keep it last. Seems like there should be an easier way though. Maybe you can do somekind of sort and make sure it stays last that way.