Drag and drop from one grid to another







    Drag and Drop between Grids
    
    
    
    
            
        
    





    
        
        
        
        
        
        
        
        
        
        
    
Sample: dhtmlxGrid Drag and Drop between Grids dhtmlxGrid main page
X

    
    


Drag-n-drop within Grid and between Grids
    




    
        

            
        
    

                


                

            


 

<script src="../js/dhtmlxcommon.js"></script>
<script src="../js/dhtmlxgrid.js"></script>
<script src="../js/dhtmlxgridcell.js"></script>
<script src="../js/dhtmlxgrid_drag.js"></script>
<script>
 

mygrid = new dhtmlXGridObject('gridbox3');
...
mygrid.enableDragAndDrop(true);
</script>





© DHTMLX LTD. All rights reserved






We have written this code that if we want to drag and drop to another grid them drop event should not be perfromed...

please help


In this case you can set onDrag event for both grids:


mygrid3.attachEvent(“onDrag”,doOnDrag);
mygrid2.attachEvent(“onDrag”,doOnDrag);
function doOnDrag(sID,tID,sourceGrid,targetGrid){
return sourceGrid==targetGrid;
}