New to Kendo UI for jQueryStart a free 30-day trial

Cancel

events

Fired when the user clicks the "cancel" button in the popup window in case the item was added via a toolbar.

Event Data

e.container jQuery

The jQuery object representing the container element. That element contains the editing UI.

e.connection kendo.data.Model

The dataItem to which connection is bound.

e.shape kendo.data.Model

The dataItem to which shape is bound.

e.sender kendo.dataviz.ui.Diagram

The widget instance which fired the event.

  <div id="diagram" style="height:600px;"></div>
  <script>
    $("#diagram").kendoDiagram({
      dataSource: {
        data: [
          { id: 1, jobTitle: "President" },
          { id: 2, jobTitle: "VP Finance" }
        ],
        schema: {
          model: {
            id: "id",
            fields: {
              jobTitle: { type: "string" }
            }
          }
        }
      },
      connectionsDataSource: {
        data: [
          { id: 1, from: 1, to: 2 }
        ]
      },
      layout: {
        type: "tree",
        subtype: "tipover",
        underneathHorizontalOffset: 140
      },
      cancel: onCancel
    });

    function onCancel(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log(e.shape.id);
    }
  </script>
Not finding the help you need?
Contact Support