Advanced User Interface Controls and Components
Gets or sets a value indicating whether the TreeView widget can accept data during drag&drop operation.
A Boolean value. The default is true, stating that TreeView accepts items or other objects to become dropped into its space during HTML5 drag&drop operation.
Other objects that are not item objects, can still drop into TreeView space as long as the data set in the HTML5 is of 'Text' type. This will automatically create an item object with text set to the value of dropped object text.
Supported in: v1.0.
In this example the TreeView widget has allowDrop set to true. This enables items or other objects to be dropped and placed into tree hierarchy of the TreeView.
$(document).ready(function() {
// Create an instance of TreeView widget
var $tree = $('#treeview').treeview({
allowDrop: true
});
});
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/integralui.accordion.css" />
<link rel="stylesheet" href="css/themes/theme-blue.css" />
<script type="text/javascript" src="external/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="external/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="external/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="js/jquery.integralui.widget.min.js"></script>
<script type="text/javascript" src="js/jquery.integralui.accordion.min.js"></script>
</head>
<body>
<div id="treeview" class="widget"></div>
</body>
</html>
.widget
{
width: 300px;
height: 300px;
}
A sample which shows how to drag&drop items between two TreeView components for jQuery.