1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    TinKim is on a distinguished road

      0  

    Default [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?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Basic bug in the example code.

    The DD objects should be created from

    Code:
    theGrid.getView().scroller
    See the code at http://extjs.com/deploy/dev/examples...dropzones.html

    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) {

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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);

  4. #4
    Ext User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    TinKim is on a distinguished road

      0  

    Default


    Hello and thank you for your answers! However:
    That only accounts for being able to drop when a grid has been scrolled.
    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.

  5. #5
    Ext User
    Join Date
    Apr 2008
    Posts
    13
    Vote Rating
    0
    bjw5392 is on a distinguished road

      0  

    Default


    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

  6. #6
    Ext User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    TinKim is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2