Please show me How to get ParentNode of a XamDataTreeNode?
Thanks
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
Thanks for your help. but there is No ResolveXamTreeItem method for XamDataTree. The question for XamDataTree not XamTree.
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
Hi,
thanks that helped me. But why is it hidden from intellisense in VS?
greetz
Tania Vladimirova"] You do not see this property - because it is hidden from intellisense in VS. But you can use it to find a 'ParenNode'.
You do not see this property - because it is hidden from intellisense in VS.
But you can use it to find a 'ParenNode'.
It works. Thank you very much for your quick support !
I use XamDataTree (Version Silverlight 2010.3 )
I do not see XamDataTreeNode has Manager property.
Please help.
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