PDA

View Full Version : Drag and Drop not working on TreePanel !!! :( What's wrong???... It must be silly !!!



agustincba
21 Apr 2011, 5:11 PM
Hi !. My name is Agustin !. Just wanted to know why my Drag & DropTreePanel example is working if I put the "enableDD" config option... Does anynone see something wrong ?...

Ext.onReady(function() {
var rootNode = new Ext.tree.AsyncTreeNode({
text: 'Root',
id: 'node-root'
});

var treeLoader = new Ext.tree.TreeLoader({
dataUrl:'tree-nodes.php'
});

var tree = new Ext.tree.TreePanel({
renderTo:'treecontainer',
loader: treeLoader,
root: rootNode,
useArrows: true,
autoScroll: true,
animate: true,
enableDD: true,
containerScroll: true,
border: true,
});

tree.on('movenode',function(tree,node,oldParent,newParent,index ){
Ext.Msg.alert('Hi', 'Hello World Example');
});

});