I have a tree being populated by an array collection. I don't have control of the data in the array collection and even when a node has no children i开发者_Go百科t still has a "children" property that is causing my tree to treat every node as branch. I can do a simple check on the length of the array in the children property. If this is 0 I need the tree to display the node as a leaf, no disclosure icon. Any thoughts on how I can achieve this? It would be nice if there were a branchFunction like the iconFunction and labelFunction.
Thanks in advance
There is a dataDescriptor property that allows you to provide a class to determine how nodes and branches are parsed. You will need to implement the ITreeDataDescriptor or ITreeDataDescriptor2 interface.
精彩评论