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
110
child items in XamDataTree are not selectable
posted

I am using the datatype TreeViewItem to add to the XamDataTree and I am then adding Children of the same type.

The XamDataTree displays as hoped, but does not allow me to select the children items.

Do you know what property I need to set to allow the children to be individually selected?

Also, if there is an equivalent of a XamDataTreeItem I could switch to that, 

thanks

Parents
No Data
Reply
  • 34430
    Verified Answer
    Offline posted

    Hello Terrill,

    I have been investigating into this behavior you are seeing, and I believe this issue is due to the way that the .NET TreeViewItem enumerates its Items collection. It appears that the Nodes that are generated for the XamDataTree are generating a single node for parent and child items.

    I feel that you may be misled on how the XamDataTree works in this case, though. It does not necessarily need to have a data source of a particular item such as the TreeViewItem or a comparable "XamDataTreeItem." As long as your data structure is hierarchical, you can use essentially any class with the XamDataTree.

    I am attaching a sample project to demonstrate using a very simple custom class to create a hierarchical structure that allows individual selection of parent and child elements.

    Please let me know if you have any other questions or concerns on this matter.

    XamDataTreeChildSelectionTest.zip

Children