Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Apr 15, 2009 06:42
open dhtmlx forum
setRowAttribute inside gridTogrid handler

Hello,

I have following code for drag and drop

mygrid.gridToGrid = function(rowId,sgrid,tgrid){

z[0] = "test data";
z[1] = test data;

return z;

}

Now I am cutomizing the array data and passing. Is there a way to specify row attribute while I am sending 'z'

Thank you in advance.

Answer posted by dhxSupport on Apr 15, 2009 08:45

To set row attribut after drag-and-drop processed you can use event "onDrop" (availible at PRO version only). Event handler has parameters:

# ID of source item
# ID of target item
# ID of droped item (has sense for mercy drag-n-drop)
# source grid object
# target grid object
# index of column from which drag started
# index of column in which drop occurs

mygrid.attachEvent("onDrop",function(sourceId, targetId,dropedId,sourceObj,targetObj,startIndex,endIndex){

z[0] = "test data"; 
z[1] = test data;

targetObj.setRowAttribute(targetId,z[0],z[1]);

});

Answer posted on Apr 15, 2009 08:47
Thank you for reply. Works