dragend

Triggered after a node has been dropped.

Event Data

e.sourceNode Element

The node that is being dropped.

e.destinationNode Element

The node that the sourceNode is being dropped upon.

e.dropPosition String

Shows where the source has been dropped. One of the values over, before, or after.

Example - subscribe to the "dragend" event during initialization

<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dragAndDrop: true,
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ],
  dragend: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Drag end", e.sourceNode, e.dropPosition, e.destinationNode);
  }
});
</script>

Example - subscribe to the "dragend" event after initialization

<div id="treeview"></div>
<script>
function tree_dragend(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("Drag end", e.sourceNode, e.dropPosition, e.destinationNode);
}
$("#treeview").kendoTreeView({
  dragAndDrop: true,
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ]
});
var treeview = $("#treeview").data("kendoTreeView");
treeview.bind("dragend", tree_dragend);
</script>
In this article