TreeListView.NodeDrag

Syntax

NodeDrag: function(sender, args);

Parameters

sender. Event source.

args. Event information:

Description

The NodeDrag event occurs on moving the dragged node along tree elements.

Example

Executing the example requires the SimpleTreeList component with the Tree identifier (see Example of Creating the SimpleTreeList Component).

// Enable drag-and-drop mode
Tree.setEnableDragAndDrop(true);
// Set events
Tree.NodeDragStart.add( function(sender, args) {
  console.log("NodeDragStart event:");
  console.log(args);
});
Tree.NodeDrag.add( function(sender, args) {
  console.log("NodeDrag event:");
  console.log(args);
});
Tree.NodeDragEnd.add( function(sender, args) {
  console.log("NodeDragEnd event:");
  console.log(args);
});
Tree.NodeDragFinished.add( function(sender, args) {
  console.log("NodeDragFinished event:");
  console.log(args);
});
// Initialize events by dragging node to random position

After executing the example drag events are added.

See also:

TreeListView