<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Drag and Drop between 2 TreePanels</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
</head>
<body>
<div id="tree-div"></div>
<script>
Ext.onReady(function(){
var json =[{'text':'A','id':'a','leaf':false,'children':[{'text':'A1','id':'a1','leaf':false,'children':[{'text':'A11','id':'a11','leaf':true},{'text':'A12','id':'a12','leaf':true},{'text':'A13','id':'a13','leaf':true},{'text':'A14','id':'a14','leaf':true}]},{'text':'A2','id':'a2','leaf':true}]},{'text':'B1','id':'b1','leaf':false,'children':[{'text':'B11','id':'b11','leaf':true},{'text':'B11','id':'b12','leaf':false,'children':[{'text':'B121','id':'b121','leaf':true}]}]}];
var tree = new Ext.tree.TreePanel({
animate: true,
enableDD: false,
loader: new Ext.tree.TreeLoader(),
lines: true,
selModel: new Ext.tree.MultiSelectionModel(),
containerScroll: false
});
var root = new Ext.tree.AsyncTreeNode({
text: 'Autos',
draggable: false,
id: 'source',
children: json
});
tree.setRootNode(root);
tree.render(document.body);
root.expand();
});
</script>
<div id="tree"></div>
</body>
</html>