Discuss anything related to web development but no technical support questions


Post by xjpmauricio »

Hi, i already know how to d&d from an external grid to a scheduler. Is there a simple way i can do the opposite? d&d from a scheduler to a grid?
Or at least have a listener on the grid that will notify me if i've dropped an event from the scheduler onto it?

Any ideias?

Thanks!!!

Post by mats »

Should be simple, setup a new drop zone with the ddGroup property set to the id of your scheduler. Let me know how it works out :)

Post by xjpmauricio »

Hi, i did this on the grid i want to drop events but it doesn't work:
enableDragDrop : true,
            ddGroup : 'schPnlRosterPlan',
            notifyDrop : function(dd, e, data){ 
                alert('notifyDrop');
            }
The ddGroup : 'schPnlRosterPlan' is the id of the Scheduler.

Post by mats »

Hmm, setting onNodeDrop on the gridpanel, is that correct? That should be specified on the drop zone. Try to create a new dropzone.

Post by xjpmauricio »

This is the base of my project: http://ext-scheduler.com/examples/exter ... gdrop.html

I'm really a bit lost here. I'm sorry.

Post by mats »


Post by xjpmauricio »

Thanks, i'll look at that and post a solution...if i find one!!! :-)

Thanks!

Post by xjpmauricio »

arghhh...it's so simple i should be spanked!!!
This basically set's the drop zone on the external grid:
            var gridTasksDropTargetEl = Ext.getCmp('gridTasks').getView().scroller.dom;
            var gridTasksDropTarget = new Ext.dd.DropTarget(gridTasksDropTargetEl, {
                    ddGroup    : 'schPnlRosterPlan',//id of scheduler and also it's ddGroup
                    notifyDrop : function(ddSource, e, data){
                            //RemoveEvent(Ext.getCmp('schPnlRosterPlan'));//alert('remove activity from scheduler');
                            return true
                    }
            });
No need to change nothing on the external grid.
Thanks.

Post by mats »

Simple is good :)

Post by xjpmauricio »

Thanks again Mr.Mats. You're a life saviour!!!

Post Reply