Hi,
I've implemented a diagram which gets the data from a database. So I'm building up the diagram node by node. I also connect the nodes based on the information of the database. My function therefore looks like this:
private void ConnectNodes(INetworkNodeSymbol parent, INetworkNodeSymbol child)
{
if ((parent != null) && (child != null) && (parent.EnableCentralPort) && (child.EnableCentralPort))
{
LineConnector link = new LineConnector(PointF.Empty, new PointF(10, 10));
link.HeadDecorator.DecoratorShape = DecoratorShape.FilledFancyArrow;
link.HeadDecorator.Size = new System.Drawing.Size(12, 9);
link.LineStyle.LineWidth = 1;
link.HeadDecorator.FillStyle.Color = Color.DarkGray;
link.HeadDecorator.LineStyle.LineColor = Color.DarkGray;
link.LineStyle.LineColor = Color.DarkGray;
link.EditStyle.AllowSelect = false;
this.diagramNetwork.Model.AppendChild(link);
bool check = false;
check = parent.NodeCentralPort.TryConnect(link.TailEndPoint);
check = child.NodeCentralPort.TryConnect(link.HeadEndPoint);
this.diagramNetwork.Controller.SelectionList.Clear();
this.diagramNetwork.Model.SendToBack(link);
}
For most of the nodes this workes fine. But for some of the nodes the connection of the parent node failes (bool check = false). Any idea why this happens? Is there a limitation how many child nodes can be connected to a parent node?
BR
Christoph
PS: I'm using 5.202.0.25
SS
Sri Subhashini M
Syncfusion Team
December 12, 2007 11:58 AM UTC
Hi Christoph,
Thank you for using Syncfusion product.
I am able to understand your requirement. Node can have maximum of 10 incoming and outgoing connections. We can increase the conncetion limit by changing ConnectionLimit property.
Please use the code in your sample and let me know if its helpful.
// Setting connection limit for the parent node
parent.CentralPort.ConnectionsLimit = 100;
Regards,
Suba
SS
Sri Subhashini M
Syncfusion Team
December 12, 2007 11:58 AM UTC
Hi Christoph,
Thank you for using Syncfusion product.
I am able to understand your requirement. Node can have maximum of 10 incoming and outgoing connections. We can increase the conncetion limit by changing ConnectionLimit property.
Please use the code in your sample and let me know if its helpful.
// Setting connection limit for the parent node
parent.CentralPort.ConnectionsLimit = 100;
Regards,
Suba
CG
Christoph Gasser
December 12, 2007 02:00 PM UTC
Thank you for your feedback. That was exactly what I needed.
BR