Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello developers & members,
I require asp.net source code for developing dynamic family tree. Your help will be really appreciated.

Regards,
Nazneen
Posted
Comments
Reiss 16-Nov-11 5:35am    
Are you after a directed acyclic graph?
nazneenrajguru 16-Nov-11 6:00am    
No i m not looking for a directed cyclic graph. Want to develop a tree in Asp.net which will have father, spouse, child relationship.

1 solution

Here is the problem: you cannot do it. Nobody can, because what is called a "family tree" is not a tree. A tree is by definition a graph without loops. A family relationship graph does have loops by a simple reason: everyone has both father and mother, and in a tree, a note only has a "parent node".

So, there is no such thing as "family tree". Nobody can create something which cannot exist. :-)

I have an opinion why this thing is still called "family tree". I think the concept was created when females was not counted, so it was really a tree, with only paternal lines shown. Not sure though, may be my knowledge of history of this phenomena is poor.

Now, the question is: how to create a family graph? This would be quite a job which needs thorough design and considerable time. I can see two basic features to be used here:

  1. HTML5 Canvas.
    See http://en.wikipedia.org/wiki/Canvas_element[^], https://developer.mozilla.org/en/Canvas_tutorial[^]
  2. SVG which can be embedded in HTML5 or used in HTML tags object or embed.
    See:
    http://en.wikipedia.org/wiki/Scalable_Vector_Graphics[^], http://www.w3schools.com/svg/svg_inhtml.asp[^].


See also: http://dev.opera.com/articles/view/svg-or-canvas-choosing-between-the-two/[^].

—SA
 
Share this answer
 
Comments
Reiss 16-Nov-11 5:57am    
This is really for the OP - but as it not a solution I have tagged it to yours. Just to give you some idea how big a task it is, I created a fully functional DAG in a win form application and it took about a month in total
nazneenrajguru 16-Nov-11 6:03am    
Hello Sarkryukov. The links which you have stated explain about creating canvas but i want dynamic panels which need to be repositioned in X, Y , left, right, top, bottom axis. Display should be like father should be on top then child and his spouse beside him.
Sergey Alexandrovich Kryukov 19-Feb-13 11:58am    
What's the problem then? You can do it all with canvas or SVG, you can consider Silverlight...
Only you cannot call this structure a tree.
This is not something to be answered in a short answer. Rather, this is the work to be done. And you are the one to do the job.
—SA
aploessl 19-Feb-13 10:22am    
This can be done. Contrary to certain opinions it has to viewed in the concept of family unit parent-child relationships with members being considered as individual elements of the units. No one seriously views the world in explicit 'nodes' unless of course the only see things in code rather than real-world applications. That being said I doubt you'd get anything for free. Do the research and develop the concept on your own. Copying it from someone else won't get you anywhere...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900