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

Unable to create connection while using connection content template

2 Answers 17 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Nishila
Top achievements
Rank 1
Nishila asked on 12 Jan 2017, 04:59 AM

Hi,

I am trying to create a diagram (Editable) with local datasource in which the user can

    1.) Edit connection between shapes

    2.) Create new connection between shapes

On connectiondefaults, i have specified content template as below

connectionDefaults: {
                     content: {
                                 template: "#= label#"                              
                            }                       
                }

But when i am trying to create a connection with mouse , it fails.Meanwhile trying to create a connection using button on top bar works fine

i.e

editable: {
                    tools: ["createShape", "createConnection", "delete"]
                },

2 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Jan 2017, 11:22 AM
Hi Nishila,

In order to access the label field of a dataItem you will need to have a similar configuration in your template:
connectionDefaults: {
  content: {
    template: "#= dataItem.label#"                             
 }


You can refer the following live example: http://dojo.telerik.com/eLeME/2


Regards,
Vessy
Telerik by Progress
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
Vessy
Telerik team
answered on 13 Jan 2017, 11:25 AM
Hi Nishila,

In order to access the label field of a dataItem you will need to have a similar configuration in your template:
connectionDefaults: {
  content: {
    template: "#= dataItem.label#"                             
 }


You can refer the following live example: http://dojo.telerik.com/eLeME/2

Can you

Regards,
Vessy
Telerik by Progress
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.
Tags
Diagram
Asked by
Nishila
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or