-
28 Nov 2008 1:58 AM #1
[2.2] Problems with grid to grid drag and drop (even on official examples)
[2.2] Problems with grid to grid drag and drop (even on official examples)
Hello out there,
I have found two bigger problems with the drag and drop-ability using two grids. The problem I found appears also on the official example. When you use the horizontal scrollbar, the drag and drop ability disappears on the grid rows. It seems like that there is an invisible mask that listens to the drag and drop, and this mask scrolls away.
The other problem is, that on this mask the mousedown-event drops into a black hole, but on the part where drag and drop does not work, the event is correctly fired. The "black-hole"-effect for (only) onmousedown is even there if you attach the event to the whole document.
I made two screenshots that visualize the problem:


Does anyone know a workaround?
-
28 Nov 2008 2:29 AM #2
Basic bug in the example code.
The DD objects should be created from
See the code at http://extjs.com/deploy/dev/examples...dropzones.htmlCode:theGrid.getView().scroller
There's a button which pops up the source code in a Window.
The function which creates the grid drop zone is:
Code:function initializeHospitalDropZone(g) {Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
28 Nov 2008 2:37 AM #3
Hmm. That only accounts for being able to drop when a grid has been scrolled.
I think there's a problem in Ext.grid.GridDragZone
The code should be
Code:Ext.grid.GridDragZone = function(grid, config){ this.view = grid.getView(); Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.scroller.dom, config);Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
28 Nov 2008 5:02 AM #4
Hello and thank you for your answers! However:
No, I cannot drag one or multiple rows if I try to grab them from a position where I have scrolled to. On wide tables, this is a serious problem because you have to scroll back to the left. The problem occurs on the official sample as well.That only accounts for being able to drop when a grid has been scrolled.
-
28 Nov 2008 8:26 AM #5
I have this exact same problem. I was having other problems related to horizontal scrolling. Condor posted a fix for those. I always thought this DnD bug was a result of those other bugs. I'm still unable to drag n drop rows after horizontal scrolling though....
http://www.extjs.com/forum/showthrea...788#post252788
-
28 Nov 2008 9:21 AM #6
The "onmousedown"-Error can be resolved with a workaround in my case using the overriding-abilities.
You can simulate a mousedown (which equals to a short dragstart in this case) when firing a custom startdrag event. See here. However, the basic problem seems to be serious.


Reply With Quote