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
440
Get ParentNode of XamDataTreeNode
posted

Please show me How to get ParentNode of a XamDataTreeNode?

Thanks

Parents
  • 7305
    posted

    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

Reply Children