This is a migrated thread and some comments may be shown as answers.

Creating Flow Diagram Programmatically

3 Answers 467 Views
Diagram, DiagramRibbonBar, DiagramToolBox
This is a migrated thread and some comments may be shown as answers.
Onur
Top achievements
Rank 1
Onur asked on 28 Dec 2015, 03:36 PM

Hi,

 

My goal is putting a flow diagram into our software in accordance with the values that came. It has to be via code. But i couldn't find any documentation about it.

I can put shapes programmatically. However,i have no idea about creating bindings between them by lines, setting up positions without ruining.

If you may give some hints, examples or lead me .i'll be thankful.

 An example attached.

 Regards,

 Onur

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Dec 2015, 12:24 PM
Hello Onur,

Thank you for writing.
 
We have an advanced example in our Demo application >> Diagram >> Organization Chart section which is quite useful on building a similar layout. The Demo application is usually located at the following path: C:\Program Files (x86)\Telerik\UI for WinForms Q3 2015\Examples\QuickStart\bin

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik

0
Onur
Top achievements
Rank 1
answered on 30 Dec 2015, 08:24 AM

Thanks Dess,

This is the view that i want. But i need to create them dynamically. If it is possible, simple  ways of creating rectangle, arrow, line etc via c# code. Do you any advices about this?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Dec 2015, 12:01 PM
Hello Onur,

Thank you for writing back.

The referred example creates the hierarchy dynamically as well. However, it uses a custom implementation. You can select the OrgChartForm.cs from the code dropdown (see the attached screenshot) and follow PopulateWithData method. The sample data is stored in an XML file. For each node, a new OrgContainerShape is created and added to RadDiagram. You can refer to the OrgContainerShape implementation which is a derivative of RadDiagramContainerShape. Additional information for container shapes is available here: http://www.telerik.com/help/winforms/diagram-diagram-items-container-shapes.html

Note that you have access to the source code in the Demo application. It is usually located at the following path: C:\Program Files (x86)\Telerik\UI for WinForms Q3 2015\Examples

I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Telerik

Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Onur
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Onur
Top achievements
Rank 1
Share this question
or