Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Nov 07, 2007 07:05
open dhtmlx forum
DHTML Grid

I'm trying to make dhtmlXgrid behave differently depending upon the target grid for drag n drop functionality.

I have three grids A, B, C instantiated.

For drag from A to B ..it should enable mercy drop and from A to C it should disable mercy drop.

Thanks,

Ikram Shah
Answer posted on Nov 08, 2007 05:37
you can use setDragInHandler for such purpose

gridB.setDragInHandler(function(a,b,src,trg){
    if (src==gridA) gridA.enableMercyDrag(true);
    return true;
});

gridC.setDragInHandler(function(a,b,src,trg){
    if (src==gridA) gridA.enableMercyDrag(false);
    return true;
});