2
votes

I have two grid-panels to drag from grid1 and drop on grid2, and a reset button with this handler function:

handler: function(){
                //refresh source grid
                Ext.getCmp('grid1').getStore().load();
                //purge destination grid
                Ext.getCmp('grid2').removeAll();
            }

All works good, but when I click on the reset button, I can't drop on grid2 again!

1
may be try removing only the child nodes of root node will help, as drag n drop needs atleast one root node to drop into.SriN
How to do it, sorry but I haven't understood youAminesrine
while resetting you can remove only the records from the store of that grid, in this case removeAll on grid may cause a js error and thats why the drag no longer works. so for removal: Ext.getCmp('grid2').getStore().removeAll()SriN
bump for user711819, why not post as the answer?Reimius

1 Answers

0
votes

You're calling the removeAll() method from the grid component here, not the store... which probably breaks the grid.

You should try with:

Ext.getCmp('grid2').getStore().removeAll();