PDA

View Full Version : Custom DragDrop template with grid



dobberph
21 Dec 2012, 4:43 AM
Hi all,

I'm trying to get a custom drag-rendering for my grid.
At least I have the simple plugin that provides dd.

Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.panel.Panel',

layout: {
type: 'anchor'
},

initComponent: function() {
var me = this;

Ext.applyIf(me, {
items: [
{
xtype: 'gridpanel',
height: 150,
title: 'U10m -29kg',
store: 'MyArrayStore',
viewConfig: {
plugins: [
Ext.create('Ext.grid.plugin.DragDrop', {
ptype: 'gridviewdragdrop'
})
]
},
columns: [
{
xtype: 'numbercolumn',
dataIndex: 'id',
text: 'Id'
},
{
xtype: 'gridcolumn',
dataIndex: 'vorname',
text: 'Vorname'
},
{
xtype: 'gridcolumn',
dataIndex: 'nachname',
text: 'Nachname'
}
]
},
{
xtype: 'gridpanel',
height: 150,
title: 'U10m -32kg',
store: 'MyArrayStore1',
viewConfig: {
plugins: [
Ext.create('Ext.grid.plugin.DragDrop', {
ptype: 'gridviewdragdrop'
})
]
},
columns: [
{
xtype: 'numbercolumn',
dataIndex: 'id',
text: 'Id'
},
{
xtype: 'gridcolumn',
dataIndex: 'vorname',
text: 'Vorname'
},
{
xtype: 'gridcolumn',
dataIndex: 'nachname',
text: 'Nachname'
}
]
}
...


Perhaps someone has a hint?
In the examples I only find a possibility over a drag zone. But I can't transfer it to my app.
Thanks a lot,
Tobias

mitchellsimoens
22 Dec 2012, 8:28 PM
I'm not quite sure what you mean by custom template

dobberph
23 Dec 2012, 12:51 AM
Ah,
I mean in the dragging process another presentation as "<icon>{0} selected row{1}".
I want to have a custom icon and a custom text in which I need the dragged data.

Thanks a lot.