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.

Change postion nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

91157 Nov 6,2009 08:38 AM Jun 18,2010 03:21 AM ASP.NET Web Forms (Classic) 6
loading
Tags: DiagramWebControl
Alberto Munoz
Asked On November 6, 2009 08:38 AM

Hi!

I'm using your diagram with OrgChartLayoutManager.

I want change the position of some nodes. I want the nodes in another row.
I have probed this:
CType(node, IUnitIndependent).SetPinPoint(New PointF(nodo.PinPoint.X, height+80), MeasureUnits.Pixel)

But this does not work with OrgChartLayoutManager. What can I do?

Thanks!!!

Dinesh M [Syncfusion]
Replied On November 9, 2009 04:11 AM

Hi Alberto,

If you have to manually set the position of nodes laid out by Layout Manager then you have place that code after the following code, which performs the layout.

this.diagram.LayoutManager.UpdateLayout(null);
CType(node, IUnitIndependent).SetPinPoint(New PointF(nodo.PinPoint.X, height+80), MeasureUnits.Pixel);

Regards,
Dinesh

Alberto Munoz
Replied On November 9, 2009 07:48 AM

This is working in most of cases but sometimes "CType(nodo, IUnitIndependent).SetPinPoint(New PointF(nodo.PinPoint.X, nodo.PinPoint.Y + 80), MeasureUnits.Pixel)" does not change the PinPoint.

Where is the problem?

Alberto Munoz
Replied On November 9, 2009 09:02 AM

I have just solved it by using this sentence:

Me.DiagramWebControl1.Model.BoundaryConstraintsEnabled = False

Dinesh M [Syncfusion]
Replied On November 11, 2009 01:37 AM

Hi Alberto,

Thanks for the update.

Regards,
Dinesh

Ven
Replied On June 17, 2010 03:24 AM

Hi!


I am new to syncfusion essential diagram. I am using the Syncfusion winforms diagram library.

My requirement is:

1) I want to draw structure from table(which is having the parent and child nodes).

2) After drawn the structure, if i change the nodes postion(changing the child node from one parent to another parent or adding new symbol(sub node)), these changes should be updated to my table.

Could you please provide some example to achive this requirement

Melba Winshia [Syncfusion]
Replied On June 18, 2010 03:21 AM

Hi,

Thank you for contacting Syncfusion Products.

1) I want to draw structure from table :

You can draw structure from table by using the following code snippet:

DataTable dt;
Syncfusion.Windows.Forms.Diagram.Controls.Diagram d1 = dt.Rows[0]["Diagram"] as Syncfusion.Windows.Forms.Diagram.Controls.Diagram;
d1.SaveBinary("d1");
this.diagram2.LoadBinary("d1");


2) If I change the nodes position, these changes should be updated to my table:

You can update the changes to table by using the following code snippet:

DataTable dtNodes;
dtNodes = new DataTable();
for (int i = 0; i < diagram1.Model.Nodes.Count; i++)
{
dtNodes.Columns.Add(new DataColumn(string.Format("Node{0}", i), typeof(object)));
}

foreach (INode objINode0 in diagram1.Model.Nodes)
{
if (objINode0 is Node)
{
DataRow dr = dtNodes.NewRow();
for (int j = 0; j < diagram1.Model.Nodes.Count; j++)
dr[j] = objINode0;
dtNodes.Rows.Add(dr);
dtNodes.AcceptChanges();
}
}



Please try this and let me know if this helps.

Thanks,
Melba



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.

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.

;