Unable to create connection while using connection content template

3 posts, 0 answers
  1. Nishila
    Nishila avatar
    2 posts
    Member since:
    Jan 2017

    Posted 11 Jan Link to this post

    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. Vessy
    Admin
    Vessy avatar
    1583 posts

    Posted 13 Jan Link to this post

    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.
  3. Vessy
    Admin
    Vessy avatar
    1583 posts

    Posted 13 Jan Link to this post

    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.
Back to Top