PDA

View Full Version : Drag/Drop using Ext.dd.DD



daltenhof
18 May 2012, 9:52 AM
Hello,

I'm trying to work through the tutorial "Understanding Drag and Drop with Ext JS" and am running in to a problem. I've created a View (id: firstDraggableView) with some div elements that have id's that look like: 1draggableCar, 2draggableCar, 3draggableCar, etc. Then, I've entered the following line of code in the viewready handler of the View :



var draggableCars = Ext.get('firstDraggableView').select('div');
draggableCars.each( function(el) {
var dd = new Ext.dd.DD(el.id, 'dragCarsGroup',{});
});


I've put a breakpoint in the each() function, and it's getting called the appropriate number of times. I've checked the DragDropManager, and the appropriate number of items appear. However, the items in the view are not 'draggable' in any way. The tutorial was created for Ext 3, so maybe this in not the right way to do things in 4. Any ideas what I'm doing wrong?

daltenhof
21 May 2012, 8:15 AM
Needed to correct the name of the tutorial. It's called "5 Steps to Understanding Drag and Drop with Ext JS" and is located here:

http://www.sencha.com/blog/5-steps-to-understanding-drag-and-drop-with-ext-js/

polycom
17 Jan 2013, 7:28 AM
Where can I find a working tutorial for implementing Drag and Drop for Extjs 4?

-- Patrick