PDA

View Full Version : Drag and drop to form panel



courtera
11 Feb 2013, 3:03 PM
Hi,

I am trying to drag from a grid panel to a form panel but am having some difficulties. How can I use Ext.define() to define a class to receive the dropped information from the grid panel? I am pretty new to ExtJS but have been struggling with the examples. Any help would be greatly appreciated.

Thanks!

evant
11 Feb 2013, 3:26 PM
There's already an example of it in the SDK download:

/examples/dd/dnd_grid_to_formpanel.html

courtera
11 Feb 2013, 3:29 PM
I have already looked at that example. I do not understand how to use Ext.define to get that code to work.

evant
11 Feb 2013, 3:31 PM
Then I don't really understand the question. define() is just used to create a class definition, so it doesn't really have any impact on the code, it's essentially just re-arranging it. You'll need to elaborate.

courtera
11 Feb 2013, 3:42 PM
I get an error with formpanel.body specifically if I am setting things up correctly. The structure of my file looks like this:


var ... (all the vars from the example)

Ext.define('blah'
alias:'widget.blah',
extend:'Ext.container.Container'

initComponent:function()
{
this.callParent(arguments);

this.add{(
xtype:'panel',
layout: 'border',
items:[ formPanel ]
});
}

)};



I can post the entire file if it would help. I appreciate the help :)

courtera
12 Feb 2013, 8:40 AM
How should I rearrange my file so that it works? I feel like the formpanel is not being rendered which is causing the formpanel.body error.