Search
TreeView.acceptDrop Property
See Also
 






Gets or sets the TreeNode instance that can be dropped.

Namespace: MindFusion.Common.UI
File: TreeView.js

 Syntax

JavaScript  Copy Code

get acceptDrop() {}

 Property Value

A TreeNode instance.

 Example

The following code creates a new TreeView element using a <div> element with id "treeview" initialized in an HTML page. Then it sets its acceptDrop property:

JavaScript  Copy Code

var treeView = new ui.TreeView(document.getElementById("treeView"));
treeView.width = treeView.height = ui.Unit.percentage(100);
treeView.theme = "standard";
treeView.loadOnDemand = true;

// create a tree node that will be a root in our hierarchy
var root = new ui.TreeNode("body");
root.expanded = true;

treeView.items.add(root);
treeView.acceptDrop = root;

 See Also