Node Link

Can Anyone Please help me ?

i am a new user to GO Diaramming and i want to create links connected to nodes.
A sample example that can help me.
Thanks a lot in advance.

From MinimalApp.cs:

[code] // create two nodes for fun…
GoBasicNode node1 = new GoBasicNode();
// specify position, label and color
node1.Location = new PointF(100, 100);
node1.Text = “first”;
node1.Editable = true; // first node is editable with F2 only
node1.Brush = Brushes.Blue;
// add to the document, not to the view

  GoBasicNode node2 = new GoBasicNode();
  node2.Location = new PointF(200, 100);
  node2.Text = "second";
  node2.Label.Editable = true;  // second node is editable by clicking only
  node2.Brush = Brushes.Magenta;

You can then add:

GoLink link = new GoLink(); link.ToArrow = true; link.FromPort = node1.Port; link.ToPort = node2.Port; myView.Document.Add(link);

thanks a lot walter.

And thanks for the download for the datasetdemo2 version of the application.
Can u please help me on one point i went through your datasetdemo2 Collapse and expand.
i am facing one problem i want to set the link from the child to root parent backword.
Child a Child of b Backword Link directed to A
A --------------->B-----------> C -------------> A
How can i set the same.
Thanks again for the great help.

I don’t understand your question. You can just create a link from C to A if you want.