Hi,
Thank you for contacting Syncfusion Support.
1) I want to draw structure from table :
You can draw structure from table by using the following code snippet:
[CS]
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:
[CS]
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 refer to the sample in the following link which illustrates this:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=DiagramDataTable247262108.zipPlease try this and let me know if this helps.
Thanks,
Jaffer.B