View Full Version : Drag and Drop

30 Oct 2012, 7:49 AM
Attempting to do drag and drop within a panel

I have 2 tabs

Tab 1 is an order entry form.
Tab 2 is a Grid Panel and an Merge Panel (Form Panel)

Within Tab 2 is an issue I am having and I have attached the Code of Tab 2

I want the user to be able to do dnd within the grid and also drag the item to the Merge Panel where it will display details of 2 records allowing the person to click a button and merge the records together.

My issue is I am using the example: Grid to Form but that uses the following line
var formPanelDropTargetEl = formPanel.body.dom;

my formPanel does not have access to the body and I want to control region of the Dnd could somebody help me with some direction on how to handle drag and drop out of the grid


1 Nov 2012, 9:22 AM
Your form panel doesn't have access to it's own body?

1 Nov 2012, 10:04 AM
I get that, how do I get around that?

1 Nov 2012, 10:44 AM
No I was asking. I don't see why it shouldn't unless you are trying to get the reference too early.

1 Nov 2012, 10:58 AM
I am using the example from Drag and Drop Grid to Form. My wrinkle in the this is it is nested into a tab. The process appears the same as the example but I am a panel deeper.

I have opened a ticket for Support on this as well because everything I do gets me to the same conclusion and I cannot seem to get around it.

2 Nov 2012, 6:37 AM
I guess your are trying to setup everything at page load - and fail, because of deferred tab render (first is active and your forms are on second).
To workaround this, one may set http://docs.sencha.com/ext-js/4-1/#!/api/Ext.tab.Panel-cfg-deferredRender to false, but better is to setup d'n'd on http://docs.sencha.com/ext-js/4-1/#!/api/Ext.AbstractComponent-event-boxready event.

7 Nov 2012, 5:35 AM
The after render worked, I could not get the box ready event to fire for me.