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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add horizontal line to a grid

Thread ID:





97391 Nov 23,2010 02:43 PM UTC Nov 29,2010 07:39 AM UTC General Discussion 1
Tags: General Discussion
Asked On November 23, 2010 02:43 PM UTC

How do I add a horizontal line to a WODiagram grid. This horizontal line should move down automatically when i add any kind of block above the line. I am using C#. Kindly help me out with this.

Thank you

Pandi Murugan A [Syncfusion]
Replied On November 29, 2010 07:39 AM UTC

Hi Rohit,

Thanks for using Syncfusion products.

We suggest you to change the PinPoint of Line based on bounding rectangle of the block(node)which is added to the diagram. Please refer the below code snippet.


//Node Collection Changed event

void EventSink_NodeCollectionChanged(CollectionExEventArgs evtArgs)
if (evtArgs.ChangeType == CollectionExChangeType.Insert)
if (evtArgs.Element != null)

Node node = (Node)evtArgs.Element;
//Get the Line
Node lineNode = diagram1.Model.GetChildByName("MyLine");
//Check the BoundingRectangle's of Line and Node(Block)
if (lineNode.BoundingRectangle.Top < node.BoundingRectangle.Bottom)
//Change the PinPoint of Line
lineNode.PinPoint = new PointF(lineNode.PinPoint.X,node.BoundingRectangle.Bottom + 20);

For your convenience, we have created a simple sample to demonstrate this and the same can be downloaded from the below link.


Kindly try the above sample and let me know if this helps.

Pandi Murugan A


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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