TreeNode.Draggable

Syntax

Draggable: Boolean

Description

The Draggable property indicates whether the node can be dragged.

Comments

If the property is set to True, the node can be dragged. By default this property is set to False.

Example

To execute this example, create the TreeList component named treeListSett, as it is shown in the page Example of Creating the TreeList Component. Set up dragging option for South Africa node and add handlers for the events TreeList.NodeDrag, TreeList.NodeDragEnd, TreeList.NodeDragFinished and TreeList.NodeDragStart:

var node = treeListSett.getNodes().getItem(0).getNodes().getItem(0).getNodes().getItem(0);
node.setDraggable(true);
treeListSett.NodeDrag.add(function (sender, args)
{
    console.log("NodeDrag")
});
treeListSett.NodeDragEnd.add(function (sender, args)
{
    console.log("NodeDragEnd")
});
treeListSett.NodeDragStart.add(function (sender, args)
{
    console.log("NodeDragStart")
});
treeListSett.NodeDragFinished.add(function (sender, args)
{
    console.log("NodeDragFinished")
});

After executing the example the node named South Africa is available to drag. On dragging the node the browser console shows messages that contain names of the currently occurring events.

See also:

TreeNode