Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
610
ParentItem Bug
posted

Hello,

  I think I found a bug with the ParentItem property of a node.  When a node gets added to another, the child node's ParentItem node is always null.  I think based on the documentation, this should be the reference to the parent node.  Is there any work around to get the parent node of a child?  Thanks.

 

Infragistics.Controls.Menus.XamTreeItem ndeRoot = new Infragistics.Controls.Menus.XamTreeItem();
ndeRoot.Header = "RootItem";

Infragistics.Controls.Menus.XamTreeItem ndeChild = new Infragistics.Controls.Menus.XamTreeItem();
ndeChild.Header = "ChildItem";
ndeRoot.Items.Add(ndeChild);

this.XamTree1.Items.Add(ndeRoot);

if (ndeChild.ParentItem == null) {
 System.Windows.MessageBox.Show("Parent Null");
} else {
 System.Windows.MessageBox.Show("Parent Not Null");
}

Parents Reply Children