Dynamic data to visual tempate using data source created server side

2 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    2 posts
    Member since:
    Aug 2014

    Posted 11 Sep 2014 Link to this post

    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.


    Many Thanks
  2. Slav
    Slav avatar
    1359 posts

    Posted 16 Sep 2014 Link to this post

    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.


    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.

Back to Top