Hi,
I have tableNodes with 2 anchorpoints on each row. Those anchorpoints allow both incoming & outgoing links:
AnchorPoint ptin = new AnchorPoint(50, 50, true, true, Color.Red, 0);
AnchorPoint ptout = new AnchorPoint(50, 50, true, true, Color.Red, 3);
How can I create a link from a specific cell to another ??? ? I can do this using the User Interface, but I don't know how using code.
I used the Entities sample modifiying the above code and adding a button that does:
private void button2_Click(object sender, EventArgs e)
{
TableNode node1 = null, node2 = null;
foreach (DiagramNode node in this.diagram.Nodes)
{
if (node is TableNode)
{
if (node1 == null)
node1 = (TableNode)node;
else if (node2 == null)
{
node2 = (TableNode)node;
break;
}
}
}
if (node1 != null && node2 != null)
{
// Create link between 2 specific cells
this.diagram.Factory.CreateDiagramLink(node1, 0, node2, 0);
}
}
By default, it uses the column 2 for node1 and column 1 for node2. I would like to specifiy which columns, by example from column 2 to column 2.
Thanks,
Marie