Categories | Question details Back To List | ||
drag and drop of cells in bewteen grids I tried using the onDrag eventl however, my code doesn't seem to work. Below is my code... mygrid3.attachEvent("onDrag",function("gridbox2","gridbox3",mygrid2,mygrid3,'1','1') { alert('dragging'); }) I tried replacing "onDrag" with "onXLE" and it worked. Furthermore, the ID of source item and the ID of target item, are they the id of the div that contains the grids? Answer posted on Dec 05, 2007 01:52 Please check code below, which shows correct event initialization , please be sure that event attached to target grid. mygrid3.attachEvent("onDrag",function(sid,tid,sgrid,tgrid) { alert('dragging '+sid+" on "+tid); return true; }) Also, while it not an error, if you not return true from onDrag event it will block d-n-d operation. >>the ID of source item and the ID of target item The parameter in function is not some predefined values, this is name of variables which will be available inside handler code, so this will be ID of source and target rows |