Creating Flow Diagram Programmatically

4 posts, 0 answers
  1. Onur
    Onur avatar
    6 posts
    Member since:
    Apr 2015

    Posted 28 Dec 2015 Link to this post

    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

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 29 Dec 2015 Link to this post

    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

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Onur
    Onur avatar
    6 posts
    Member since:
    Apr 2015

    Posted 30 Dec 2015 in reply to Dess Link to this post

    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?

  5. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 30 Dec 2015 Link to this post

    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

Back to Top