XamDataTreeNode has some overridable OnXYZ functions, implying it can be extended.
Instances seem to be created by the XamDataTreeNodesManager, but the NodeManager property of a XamDataTree is read-only.
How do I extend the XamDataTreeNode and have nodes in my tree be of a custom type (i.e.: MyXamDataTreeNode) ?
Hi Patrick,
I have been looking into your requirement and this custom functionality could not be achieved without using the source code of the XamDataTree and modify/extend that XamDataTreeNode class there. You could download the source code by going to your account section in our website.
Let me know, if you need any further assistance on this matter.
Hello Patrick,
I am just checking if you require any further assistance on the matter.
I think we got it working (and of course, have now decided to go a different route!)
The biggest issue we ran into was signing. The assemblies need to be signed for us to use them and all the circular externalsvisibleto made that rough (chicken and egg problem). Most of the time updating the source was dealing with that issue.
Change notifications coming from the tree were also a problem. The tree would notify of changes that weren't really changes, which usually is not a problem. But in our case, we have different owners of whether something is selected and this caused race conditions at times. This caused us to have to implement our selection logic both in the tree control and in our under-the-hood model.
The selection change approach was to make the existing XamDataTree extensible and extend a new HierarchicalSelectedNodesCollection and HierarchicalSelectionSettings that can optionally be used if you want this selection mechanism.
I figure this is a very domain-specific way for a tree to work, but we might be able to deliver our changes if you guys are interested in rolling them into the product.
Thank you for your feedback. I am glad that you have resolved the issue.I would also like to suggest you to log this selection change approach for the XamDataTree as a product idea if you would like it to be part of the control. Our product management reviews the suggestions that are logged in the site and often new features are implemented based on that feedback. The Product Ideas site is: http://ideas.infragistics.com. Please find the details below.
Steps to create your idea: 1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The benefits of submitting the product idea yourself include:- Direct communication with our product management team regarding your product idea.- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.- Allow you to shape the future of our products by requesting new controls and products altogether.- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
I have run into another problem with our implementation. We are enforcing "downstream" selection consistency. So given the tree:
/root
/A
/B
If you select root, A and B are both selected. If you then de-select A, the root is automatically deselected.
We mostly have this working with the exception of change notifications in the case of a node being deleted that is selected. It seems as though updating the selection set is being done before the node is completely removed which is causing us problems.
This is in XamDataTree project.
I have a test tree that is:
C
1
2
3
4
The test selects C which automatically (with my changes) selects 1,2,3,4. I then delete 2. NodesManager.RemoveSelectedItemsFromNodes eventually gets called, passing in the node "2". In the debugger if I look at [node "2"].Manager.ParentNode.Nodes, I see three nodes, but I see 1,2,3, not 1,3,4 as expected. It's like the count got updated but the items did not.
Any help you can provide on how to debug this would be appreciated.
If I let this completely finish, the final tree does indeed have nodes 1,3,4 as expected.