Drag and Drop Example, move rows in a grid
In this sample Ext Js grid: http://dev.sencha.com/deploy/ext-4.0...d_to_grid.html
You can drag and drop items from one grid to another, but you can't change the order of items in the second grid.
You can drop items back and forth and order them the way you wish, but that's not an elegant way of doing it.
What needs to change in the code so that one can move items up and down on the second grid (the one on right) ?
Is it even possible?
I was also gonna suggest that you implement this in your next version of demos, you are already allowing ordering, but not in a nice way, why not do this as well? It's also relevant to drag and drop so that would make this example more useful.
Thanks for any help.
Dragging within the same grid is the default if you enable drag/drop. Take a look at the dragGroup and dropGroup settings in the demo to see why it behaves the way it does.
That's not very helpful of course one would look at drag and drop listeners,
What I'm interested in is what specifically needs to change so that it behaves like the lower form in this example:
To enable drag/drop both between 2 grids and within the grids themselves you should just need to match up the 2 dragGroup and 2 dropGroup settings to all have the same value.
You are right, thank you very much.
Need code changes
Still not clear, can you please show the code how to do it?
Tags for this Thread