Binding

8 posts, 0 answers
  1. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 20 Sep 2017 Link to this post

    How do I combine adding shapes programmatically, and also binding them? I have a hierarchical data model and adding shapes pretty much like this, in pseudocode. How then do I bind the data? Currently I have no need for connectors, just shapes.

    for each Type1 in model
        raddiagram.AddShape( new Type1Shape)
     
    for each Type2 item in model
       raddiagram.AddShape( new Type2Shape)
       for each Type3 in item
          raddiagram.AddShape( new Type3Shape)
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3451 posts

    Posted 22 Sep 2017 Link to this post

    Hello, Tino, 

    Thank you for writing.  

    RadDiagram supports data binding. You can directly bind the tasks without the necessity of adding the shapes programmatically. I would recommend you to have a look at the online documentation related to the data binding topic for RadDiagram: http://docs.telerik.com/devtools/winforms/diagram/data-binding/data-binding-basics

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

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 24 Sep 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks. Yes I know, I've spent a lot of hours trying to get that to work (and posted about it) with some success, but then I went back to adding them programmatically due to various issues I was having. So I'll have to revisit it and see. Is it best to use data tables like in the samples?
  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3451 posts

    Posted 26 Sep 2017 Link to this post

    Hello, Tino, 

    Thank you for writing.  

    Using DataTables is just an example. You can use custom objects as well. The following help article demonstrates an example: http://docs.telerik.com/devtools/winforms/diagram/data-binding/binding-to-custom-objects

    Feel free to use this approach which suits your requirements best.

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

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 24 May 2018 Link to this post

    So after all this time not using RadDiagram (I'm using custom drawing code) I'm looking into it again.

    I don't think I asked the question clearly enough. My question is how to combine the binding of custom Objects with using custom Shapes.

    Is this possible? Thanks.

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3451 posts

    Posted 25 May 2018 Link to this post

    Hello Tino,

    Thank you for contacting Telerik Support.

    Your question has already been answered in the other thread you have opened on the same topic. Please, see our answer there for more information.
    We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    Thank you for your understanding.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  7. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 27 May 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi. That post was about unbound mode. This is about bound mode. Thanks.
  8. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3451 posts

    Posted 28 May 2018 Link to this post

    Hello, Tino,    

    By default, when you bind RadDiagram, RadDiagramShape items are created by the DiagramDataLayer. It would be nice to have the possibility to replace the DiagramDataLayer for example and override its CreateDiagramShapeItem method to use custom RadDiagramShapes. I have logged it in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

    Currently, the possible solution that I can suggest is to use unbound mode and add your custom shapes considering the data stored in the model's records.

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

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top