Hi,
We are using XAM data Tree and adding parent and their child Node. We have added Is Selected property for child node. But we want that we can select only child Node, not its parent Node. We want to disable the selection property of parent node.
Please let us aware for that.
Thanks
Hello Kanwar,
I am just checking if you have any other questions on the matter.
The selected nodes settings are applied for all layouts of the tree so I would suggest you to handle the SelectedNodesCollectionChanged event and remove the last selected node if it is part of the parent layout. Here is a code snippet for the same:private void MyTree_SelectedNodesCollectionChanged(object sender, NodeSelectionEventArgs e) { if ( (e.CurrentSelectedNodes.Count>0) && (e.CurrentSelectedNodes[e.CurrentSelectedNodes.Count-1].NodeLayout.Key == "CategoryLayout")) e.CurrentSelectedNodes.RemoveAt(e.CurrentSelectedNodes.Count - 1); }If you have any other questions, feel free to update the thread.