This is a migrated thread and some comments may be shown as answers.
Binding
7 Answers 12 Views
This is a migrated thread and some comments may be shown as answers.
Tino
Top achievements
Rank 1
Tino asked on 21 Sep 2017, 01:04 AM

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)

7 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Sep 2017, 10:32 AM
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.
0
Tino
Top achievements
Rank 1
answered on 24 Sep 2017, 11:23 PM
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?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Sep 2017, 08:35 AM
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.
0
Tino
Top achievements
Rank 1
answered on 25 May 2018, 02:48 AM

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.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 May 2018, 09:36 AM
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.
0
Tino
Top achievements
Rank 1
answered on 27 May 2018, 10:03 PM
Hi. That post was about unbound mode. This is about bound mode. Thanks.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 May 2018, 11:56 AM
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.
Asked by
Tino
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Tino
Top achievements
Rank 1
Share this question
or