PDA

View Full Version : How to drag treenode onto container



Caius Caesar
18 Oct 2012, 2:54 AM
How to drag treenode onto container

I want to be able to drag a treenode on a container and then receive a drop event. The treenode is draggable within the tree and this works fine. I also managed to be able to drag other components on the container, but I can't find a way to drag and drop the treenode onto the container.

Any help would be appreciated!

James Goddard
18 Oct 2012, 4:32 AM
You need to implement a drop target on the destination container.

http://docs.sencha.com/ext-js/4-1/#!/example/dd/dnd_grid_to_formpanel.html

Caius Caesar
18 Oct 2012, 4:58 AM
Thanks, this should get me going, I was looking at the dropzone example with the cars and trucks and it got me nowhere.