Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by richard white on Nov 17, 2008 09:10
open dhtmlx forum
drag and drop error

HI

i have a grid with an ondrag event.

i dont have any code running in it. but when i click a folder and begin to drag it, the moment it moves across the top of another folder i am getting the following error:

window.dhtmlDragAndDrop.dragNode.firstChild.rows is undefined
dhx_allow_drag()dhtmlx_extdrag.js (line 9)
dhx_ext_check(folder_24 0=folder_24, "folder_3", Object entBox=div#dhxGridObj_Sgh7DTbSLJc5.gridbox, Object entBox=div#dhxGridObj_Sgh7DTbSLJc5.gridbox)dhtmlx_extdrag.js (line 9)
ev()()dhtmlxgrid.js (line 661)
ev()("onDragIn", Object 0=folder_24 1=folder_3 2=Object 3=Object)dhtmlxgrid.js (line 661)
gridToGrid()(td, td.cellselected, 425, 354)dhtmlxgr...d_drag.js (line 25)
checkLanding()(td, mousemove clientX=425, clientY=354)dhtmlxcommon.js (line 46)
callDrag()(mousemove clientX=425, clientY=354)dhtmlxcommon.js (line 44)
[Break on this error] function dhx_ext_check(sid,tid,sgrid,tgr..._onNotFound=function(){dhx_deny_drop()};

do you know what this is and how i can solve it please

thanks
Answer posted by Support on Nov 18, 2008 02:33
Please be sure that dhtmlx_extdrag.js included in page after dhtmlxgrid_drag.js
The error which you have describe, may occur if you are using extdrag extension, but the content of drag was somehow customized. It may occur because of incorrect files order, or if you are using custom rowToDragElement function. 
Answer posted on Nov 18, 2008 04:31
hi, yes that has stopped the error but now when i drag, it says "1 message" instead of saying the name of the folder i am dragging. do you have any documentation on this as i expect that i can customize the message?

thanks
Answer posted by Support on Nov 18, 2008 05:14
In case of "drag ext" extension, you can use 
     grid.setDragText(single,plural) 
To set message used as drag representation. 
( if you need to set such message dynamically , you can call it from onBeforeDrag event, exactly before d-n-d started )
Answer posted on Nov 18, 2008 05:29
ok thanks,

just one more question - i notice the tick appears if they run over any grid - but i have 3 grids on one page and they are only allowed to drag within its own grid - so is there a way to show the 'no drop' picture when dragging over the other grids?

thanks
Answer posted by Support on Nov 18, 2008 07:13
Answer posted on Nov 18, 2008 07:23
ok thanks