Hi All
i am with weired error, while working on wintree
issue is
I have a ultratree with fewnodes,
when user clicks on button i am creating new node and adding to curremt tree nodes.
then setting newly created Node as ActiveNode.
some times it is working fine but some times it is reporting "Node is not part of the tree" can't set as ActiveNode
code i ahve wriiten like
UltraTreeNode currentNode = ultratree.Nodes.ActiveNode ;
UltraTreeNode childNode = new UltraTreeNode(null, "ProductA");
currentNode.Nodes.Add(childNode);
childNode.Selected = true;
ultratree.ActiveNopde = childNode
Can any one help me in this?
Can
I don't see anything wrong with the code you have here. You are clearly adding the node to the tree, so there's no reason I can see why you should get an error when you try to make it the ActiveNode.
If you are able to reproduce this problem in a small sample project, we'd be happy to take a look at it.
ok, i finally moved to TreeView Control instead of UltraTree.
Thanks guys
Hmm....no one to help?
the error is not happening all the time. but, some times
because of this reason i had to move standard Microsoft Treeview
here is the stacktrace
Type : System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The ActiveNode can only be set to a node that belongs to this control.
Source : Infragistics2.Win.UltraWinTree.v8.3
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Boolean SetActiveNode(Infragistics.Win.UltraWinTree.UltraTreeNode, Boolean, Boolean)
Stack Trace : at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView, Boolean adjustHorizontalPosition)
at Infragistics.Win.UltraWinTree.UltraTree.set_ActiveNode(UltraTreeNode value)