PDA

View Full Version : Drag and Drop on gridpanel Multiple Groups



ftrevino
4 Feb 2013, 7:51 AM
Hi,
I have two grids from which I need to allow drag and drop, and from the example seems quite simple, but on my case I need to be able to drag from the grid on the right to the grid on the left, and also from the grid on the left to itself. So basically the grid on the left should allow drops from the one on the right and from itself. So far I haven't found a way to do it. Something like this:

Left Grid
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'leftGridDDGroup',
dropGroup: 'rightGridDDGroup and leftGridDDGroup' <=== Of course this don't work.
}
}
Right Grid
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'rightGridDDGroup'
}
}



Also both grids have different stores and models, is there a way to prevent the data from actually moving?, I just need to handle the move, see which rows are moved in order to create myself the new rows on the left side.

sword-it
4 Feb 2013, 8:14 AM
Hi

see this link :http://dev.sencha.com/deploy/ext-4.0.1/examples/dd/dnd_grid_to_grid.html

ftrevino
4 Feb 2013, 8:19 AM
Thanks for your quick response sword-it, but as I commented on the thread, the example is quite basic, from left to right and vice-versa. But what I need is the one on the left accept drops from the right AND from the left too.