Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by hidensoft on Feb 19, 2008 04:55
open dhtmlx forum
drag and drop into one grid only

hi ,
i have 2 dhtmlxGrid .
i want drag item from grid one to grid two . this worked !
but
i don't want drag item from grid two in grid one . i can't execute this .how i can disable drop i one grid ?
Answer posted by Support on Feb 19, 2008 07:17
You can attach onDrag event and return false from it to block d-n-d

mygrid.attachEvent("onDrag",function(sid,tid,sobj,tobj){
    if (sobj == mygrid2) return false; //block drag from grid 2
});
Answer posted by hidensoft on Feb 19, 2008 08:32
helpful !!
thanks for help.
Answer posted by hidensoft on Feb 19, 2008 08:45
when i read this code , i think "This Code Worked !" , but when i do execute that , NOT Worked .
even i do deleted "if (sobj == mygrid2)" , but NOT Worked .

Please help me.
Answer posted by Support on Feb 20, 2008 06:43
Please check attached sample, it uses the same technique and works as expected.
Attachments (1)