Hi, anybody knows how to select all the nodes through of root? (UltraTree Infragistics)
A:
As far as I know, there is not method to select all nodes. But you can build your own like this:
Queue<UltraTreeNode> queue = new Queue<UltraTreeNode>(ultraTree1.Nodes);
while (queue.Count > 0)
{
UltraTreeNode node = queue.Dequeue();
foreach(UltraTreeNode child in node.Nodes)
queue.Enqueue(child);
node.Selected = true;
}
Hinek
2010-07-07 09:34:35