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. Image for the cookie policy date
close icon

Creating a diagram on the fly

Hi

Does anyone know if it is possible to create a diagram programatically? I have a SQL db that describes the relationships between various systems and their feeds. I thought the best way to show this is through a ERD type diagram.

The data can change at any time so the diagram would need to be built at run time.

If it is possible I'll invest the time in learning the control, but thought I'd check first


Thanks

1 Reply

PM Pandi Murugan A Syncfusion Team September 1, 2010 02:30 PM UTC

Hi Tony,

Thank you for using Syncfusion Products.

You can create Syncfusion DiagramWebControl dynamically and you can populate the data within diagram. Please refer the following code snippet.



[C#]
using Syncfusion.Windows.Forms.Diagram;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Syncfusion.Web.UI.WebControls.Diagram.DiagramWebControl diagram = new Syncfusion.Web.UI.WebControls.Diagram.DiagramWebControl();
Model model = new Model();
diagram.Model = model;
diagram.LoadBinaryDocument(Server.MapPath("Enhanced Line Routing.edd"));
diagram.Width = 200;
diagram.Height = 400;
diagram.EnableScrollBars = true;
this.Controls.Add(diagram);
}
}


The following dlls need to be referenced in your application for the usage of Essential Diagram Web.

• Syncfusion.Core.dll

• Syncfusion.Shared.Base.dll

• Syncfusion.Shared.Web.dll

• Syncfusion.Diagram.Base.dll

• Syncfusion.Diagram.Web.dll

• Syncfusion.Tools.Web.dll

Add the following HttpHandler in your web.config file.









Replace this Version=X.X.X.X with Syncfusion Essential Studio version. For example Version=8.303.0.20

Please let me know if you any concerns.

Regards,
Pandi Murugan A



Loader.
Live Chat Icon For mobile
Up arrow icon