Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic A Dynamic Family Tree (Read 3310 times)
champ1979
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Apr 6th, 2007
A Dynamic Family Tree
Apr 6th, 2007 at 6:45pm
Print Post  
I am trying to build a family tree using NetDiagram.  I would like it to look like the Geni style (so each child derives from 2 parents). I'd like a line connecting the two parents and all children outgoing from this connecting line (rather than from a box of one of the parents).

Initially I want to display all the blood relatives of the user (and a plus sign on each "inlaw") and when the inlaw's plus sign is clicked, I would like to expand the tree to include the blood relatives of the user.

I have a method that returns a DataTable of all the blood relatives for any given user.  I can of course tweak this to return a string array instead.

I would appreciate if anyone could guide me on this or point me to a similar solution.

Also, is there any way to make the applet "draggable" rather than "scrollable"?

Thanks!

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: A Dynamic Family Tree
Reply #1 - Apr 7th, 2007 at 10:56am
Print Post  
Hi,

NetDiagram doesn't support connecting arrows to other arrows. Instead, you could create one or more Transparent boxes and use the AttachTo method to attach them to the line connecting the parents. Then create arrows between these boxes and the child ones.

You can handle the TreeExpanded event as shown in the OrgBrowser example and request the blood relatives from a service running on the server. Another option is to load the whole tree and just show or hide the nodes when necessary.

I think ASP.NET Ajax will let you return a dataset from a web service method and generate a JavaScript object through which you can access the data. If that does not work, you can use the dataset's GetXml method and return an XML document to the client. One of the examples here returns an XML document from the server and parses it on the client side:

http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx

You can drag the view without using scrollbars by holding ALT and dragging with the mouse. Though that looks a bit jumpy, our developers will have to fix it for the release version.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint