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

Dynamic data to visual tempate using data source created server side

1 Answer 55 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 11 Sep 2014, 03:37 PM
Hi,
How to provide data to visual template dynamically using data source created at server side. I am using visual template similar as shown in below link. I want data source to be created at server side and data to be placed in TextBlock (multiple) in template. I need hyperlink in one of the text field in shape. The href value for the hyperlink will come from above data source.

Also I want to provide different colors to the shape and those color values should come from above data source. I will have three categories of shape for example category1, category2 and category3. Depending on the category, I will decide the color for the shape. Categories will come from above data source.

http://dojo.telerik.com/uZeN/6


Many Thanks

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 16 Sep 2014, 04:02 PM
Hello Sandeep,

The Overview demo of RadDiagram should help you to achieve the desired functionality: http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultcs.aspx. The data of the diagram control in this demo is loaded declaratively on the page, which leads to the same result if you have data bound the diagram on the server - you have a diagram control on the page with shapes and connections.

This data is then used in the client-side of the demo (script.js) to create a visual template for each of the shapes. Note that the text is put in TextBlock objects and that there are several groups of shapes, each defined by the value of the Type property of the shape.

Regards,
Slav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Diagram
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or