Please show me How to get ParentNode of a XamDataTreeNode?
Thanks
Hi Friday1234,
In your case you should do this:
XamDataTreeNode currentNode = e.Node;XamDataTreeNode parentNode = currentNode.Manager.ParentNode;
I hope you will find this helpful
My question is if I have a XamDataTree node for example from NodeCheckedChange event as below:
private void pgaDataTree_NodeCheckedChanged(object sender, NodeEventArgs e){
XamDataTreeNode current = e.Node;
//How do i find a parentNode of the current node
}
Please help
Thanks for your help. but there is No ResolveXamTreeItem method for XamDataTree. The question for XamDataTree not XamTree.
You need to use XamTreeItem object. Here is an example to reference parent item in SelectionChanged event.
if (xamTree1 != null && xamTree1.SelectedItems != null && xamTree1.SelectedItems.Count > 0) { XamTreeItem item = xamTree1.ResolveXamTreeItem(xamTree1.SelectedItems[0]); if (item != null) item.IsExpanded = true; }
Sam