Version

Inserting a Node at a specific Index

The Insert method of the TreeNodesCollection inserts a node at a particular index position.

By default, the Add method of the UltraTreeNodes collection adds a node to the end of the collection.

In Visual Basic:

Imports Infragistics.Win.UltraWinTree
...
'Declare a new node
Dim node As New UltraTreeNode("insertedNode", "InsertedNode")
'Insert the new node at index postion 1. In this case 2 nodes exist previously with index positions 0 and 1 repsectively.
Me.ultraTree1.Nodes.Insert(1, node)

In C#:

using Infragistics.Win.UltraWinTree;
...
//Declare a new node
UltraTreeNode node = new UltraTreeNode("insertedNode", "InsertedNode");
//Insert the new node at index postion 1. In this case 2 nodes exist previously with index positions 0 and 1 repsectively.
this.ultraTree1.Nodes.Insert(1, node);