drag row and drop on form element

Dear Team,



I’m using the DHTMLX Grid Component version 1.6.



What I’m trying to do is drag some value from a row in my grid to a text element in my form. I use the following code (taken from examples from this knowledge base and examples from the component):



    



        



            

        

    


                




                
 


            










When I use this I only get the value 400 (??)

Could you please tell/show me how I can drag a value from my grid to my text field just like this example dhtmlx.com/docs/products/dhtmlxT … 0588860000 ?

While d-n-d
    grid._dragged - array of dragged row objects
    grid._dndExtra - index of column, from which drag operation started

    function s_control(){

        this._drag=function(sourceHtmlObject,dhtmlObject,targetHtmlObject){

            targetHtmlObject.style.backgroundColor="";

//            targetHtmlObject.value=mygrid2.cells(id,0).getValue(); //400??

           targetHtmlObject.value=mygrid2.cells(mygrid2._dragged[0].idd,0).getValue();
        }


Works like a charm!



mygrid2._dragged[0].idd that was just what I was missing as I got weird id’s in the targetfield.



Thank you