PDA

View Full Version : Grid Drag and Drop



chetan.nellekeri
23 Aug 2013, 1:51 AM
Hello,

I have a requirment in grid drag and drop..
I have two grid say gridA and gridB. If i drag and drop from gridA to gridB it should work fine. But if I drag and drop from gridB to gridA, the record should be removed from gridB but should not add to gridA.
Please advice..

mankz
23 Aug 2013, 6:32 AM
You can get a great head start by studying the already working grid-to-grid drag drop samples, and you should also read up in the API docs on how Drag Drop works.

http://docs.sencha.com/extjs/4.1.3/#!/example/dd/dnd_grid_to_grid.html

http://docs.sencha.com/ext-js/4-1/#!/api/

AssetWorks
23 Aug 2013, 9:48 AM
You can add a listener to GridA that beforedrop destroys the record. but in my opinion its kind of bad UI to do that, why not just have an action column on GridB that will remove the record from the store when clicked?