Ron
Ron

Reputation: 563

extjs 5, deine dropzone on gridpanel, but cannot drop, why?

I want to drag a pic and drop to gridpanel. I definde a gridpanel and code is below,

viewConfig: {
    listeners: {
        render: 'onPlaylistgridviewRender'
    }
},

onPlaylistgridviewRender: function(component, eOpts) {
    var gridView = component,
        grid = gridView.up('playlistgridpanel');

    grid.dropZone = Ext.create('Ext.dd.DropZone', component.el, {
        notifyDrop: function(source, e, data){
            return true;
        }
    });
}

I drag a pic , when mouse is over the grid, this icon shows dropping is forbidden.

what's wrong here? Thanks.

Upvotes: 0

Views: 303

Answers (1)

Saki
Saki

Reputation: 5856

Both dragged picture and the drop target (the grid) must be in the ddGroup.

Upvotes: 1

Related Questions