This is a migrated thread and some comments may be shown as answers.

Multiple inheritance (graph)

3 Answers 67 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Clinton Smyth
Top achievements
Rank 1
Clinton Smyth asked on 22 Mar 2012, 06:38 PM
Hi

We're looking for a control that can elegantly display a graph (where nodes can have multiple parents) as opposed to a tree.

Currently we're using RadTreeView and where nodes have multiple parents, we make a copy of the node and place it under each parent. This is not ideal as it does not highlight to the user that they're dealing with a 'copy' and what and where the other parents are.

  • Is there a way to get RadTreeView to display nodes that have multiple parents?
  • Are there any other Telerik controls that are more adept to displaying this data?
  • If not, do you have any recommendations on how we could proceed?

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 27 Mar 2012, 09:13 AM
Hello Clinton,

Unfortunately RadTreeView doesn't support this kind of functionality, and there isn't any other control in our suite that fits this scenario.

However if you want to highlight the parents of a particular node, you can do that with some client logic. I've attached a small sample page which has some nodes with multiple parents (which is implemented as you said by copying the node in each parent's child collection). When you click a node, all of it's parents are highlighted. You can also modify the code, so that instead of the parents, the nodes themselves are highlighted.
 
All the best,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Robert
Top achievements
Rank 1
answered on 01 Apr 2012, 09:37 PM
I have a similar problem.  I need to display the heritage of chemical compounds, which may be composed of mixtures, i.e., multiple parents.

If you try to display it the traditional way, with the parents at top or left, it comes out funny because you end up with multiple representations of the ultimate child, and the paths may be of varying length.

The best design I have found so far is to invert the logic and treat the child as the parent and the parents as children.  Put a label above the tree saying Inverted Inheritance Tree.  I expect this to raise some eyebrows among perfectionists, but it is justified by the non-availability of graphic tools -- from Telerik, at least.

If it is any consolation, the graph also confounds Oracle, which has built in methods for representing single-parent hierarchy.  In order to model the hierarchy, I maintain separate forward and reverse linked lists in the database.

I am still at the design stage, so suggestions for improvement are welcome.




0
Clinton Smyth
Top achievements
Rank 1
answered on 03 Apr 2012, 01:43 AM
Thanks for your response - it's good to know what's available.
Tags
TreeView
Asked by
Clinton Smyth
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Robert
Top achievements
Rank 1
Clinton Smyth
Top achievements
Rank 1
Share this question
or