PDA

View Full Version : How to turn on/off drag & drop?



aleczapka
6 Jul 2010, 5:47 AM
Hey guys,

It seems once enabled drap & drop for grids can't be stopped.
If I do this


this.grid.dragZone = new Ext.grid.GridDragZone(this.grid, {
ddGroup : this.grid.ddGroup || 'GridDD'
});


Drag & drop still be enabled even if I try to do something like this


this.grid.enableDragDrop = false;
if (this.grid.dragZone) {
delete this.grid.dragZone;
delete this.grid.view.dragZone;
}


Nothing helps, I still see the cursor changing to the drag & drop one. Even though I have this.grid.dragZone as undefined after deleting it.

Any suggestions would be great, thank you.

thiner
6 Jul 2010, 6:57 PM
How about set

enableDragDrop: false
then re-render the grid ?
Note: just an idea, I haven't tested it.