Dear Sir/Madam,
I got 3 grids on one page. I want 2 grids to be able to drag and drop between both of them.
The other grid should be able to drag and drop within its own grid, but not drop in the other two grids nor accept drops from other grids.
I tried to alter the gridToGrid method but there is no way to cancel a drop with that method (return false/null/true won’t cancel).
What can I do to let one grid ignore the drops of others.
Thanks in advance
What can I do to let one grid ignore the drops of others.
Please check
dhtmlx.com/docs/products/dhtmlxG … rid_mandnd
In your case , the best solution is to use onDrag event of 3rd grid
grid3.attachEvent(“onDrag”,function(sid,tid,sobj,tobj){
if (sobj == tobj) return true; //allow drag from the same grid
return false; //block drag from any other grid
});
The similar code need to be added to grid1 and grid2
grid1.attachEvent(“onDrag”,function(sid,tid,sobj,tobj){
if (sobj == grid3) return false; //block drag from 3rd grid
return true; //allow drag from any other grid
});