PDA

View Full Version : Drag and drop between 3 Grids using gridviewdragdrop plugin



FCTim
13 Jan 2012, 8:30 AM
Here is my setup. I have three grids A, B and C. I want to setup the following relationship.

Drag Records from A to B
Drag Records from B to A
Drag Records from B to C
Drag Records from C to B

Don't allow:
Records from A to C
Records from C to A

It would seem that I need to setup multiple Drag/DropGroups but It doesn't look like the plugin supports this. Does this mean I have to forgo using the plugin and roll my own D&D implementation? Hopefully I'm just missing something obvious. Any ideas?

Thanks,
Tim

mitchellsimoens
13 Jan 2012, 8:46 AM
The plugin fires the beforedrop event that you could use. Returning false should cancel the drop.

FCTim
13 Jan 2012, 8:49 AM
The plugin fires the beforedrop event that you could use. Returning false should cancel the drop.

Understandable but then is there a way to change the mouseover so that the icon is red instead of green? Otherwise it looks like you can drag it there but then nothing happens because you've stopped it with the beforedrop event.

mitchellsimoens
13 Jan 2012, 8:50 AM
For that you will need to override some methods in the DD classes. The plugin will not do this as you have found out.

FCTim
13 Jan 2012, 8:52 AM
For that you will need to override some methods in the DD classes. The plugin will not do this as you have found out.

I was afraid of that. Thanks for the info.