I want to create a complete visual diagram programattically base on data (example would be a flow chart) and then plug that into the diagram control to display on a form. How would I go about doing that? Do I need to create my own Model object and then plug that into the diagram control? I would love some help on this.
ADAdministrator Syncfusion Team March 9, 2005 06:57 PM
Programmatically creating a diagram using the Essential Diagram API is pretty straight-forward. Create an instance of the Diagram control(Syncfusion.Windows.Forms.Diagram.Controls.Diagram), add it to your form, and populate the Diagram control''s Model(accessible through the Diagram.Model property) with the diagram nodes (Shapes, Symbols, Labels, Links etc.,) that will make up the diagram. The ''Samples\In Depth\OrgChart'' sample demonstrates the programmatic creation and addition of diagram objects based on data obtained interactively from the user, while the ''Samples\In Depth\OrgChartXML'' sample demonstrates the creation of a diagram using data sourced form an XML file.
I have attached a sample that is a new addition to Essential Diagram, and will be included in forthcoming updates of the product. This sample demonstrates the creation of an organization chart diagram using employee information sourced from an Access database. Please refer to the sampleinfo.txt file for information about the application.
CMCory MeadMarch 11, 2005 12:52 AM
Thanks for the helpful. Information, it put me on the right path. Thanks!