We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Link / TryConnect failes sometimes

Thread ID:

Created:

Updated:

Platform:

Replies:

70373 Dec 10,2007 10:37 AM UTC Dec 12,2007 02:00 PM UTC Windows Forms 3
loading
Tags: Diagram
Christoph Gasser
Asked On December 10, 2007 10:37 AM UTC

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


Sri Subhashini M [Syncfusion]
Replied On 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



Sri Subhashini M [Syncfusion]
Replied On 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



Christoph Gasser
Replied On December 12, 2007 02:00 PM UTC

Thank you for your feedback. That was exactly what I needed.

BR


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;