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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

grouping nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

102702 Feb 22,2012 08:56 PM UTC Feb 23,2012 01:55 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: DiagramWebControl
Gary Henson
Asked On February 22, 2012 08:56 PM UTC

I can see in the Symbol Factory example how to group nodes together and then add the group to the diagram.
Is there a way to programmatically group a node to another node already in the diagram?
I cannot access the downloaded help/case info until we upgrade to 2010 Sp1 which will not happen for weeks.
Thanks for your help.
Gary


Amsath Ali M [Syncfusion]
Replied On February 23, 2012 01:55 PM UTC

Hi Gary,

Thanks for using Syncfusion products.

We suggest you to use the diagram’s ‘Group’ class to group the nodes programmatically. Please refer the below code snippet to achieve your requirement.

Here is the code:
[C#]
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 50, 100, 70);
rect.EnableCentralPort = false;
rect.FillStyle.Color = Color.SkyBlue;
rect.FillStyle.Type = FillStyleType.LinearGradient;


Syncfusion.Windows.Forms.Diagram.Ellipse ellp = new Syncfusion.Windows.Forms.Diagram.Ellipse(30, 10, 40, 40);
ellp.EnableCentralPort = false;
ellp.FillStyle.Color = Color.Lime;
ellp.FillStyle.Type = FillStyleType.LinearGradient;

//Grouping Nodes
Group grp = new Group();
grp.AppendChild(rect);
grp.AppendChild(ellp);
diagram1.Model.AppendChild(grp);
Here is the sample:
F102702-1784928933.zip

Please let us know if you have any queries.

Regards,
Amsath Ali. M



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

;