DHTMLX Docs & Samples Explorer

Index
dhtmlxgrid
API Methods

### gridToGrid(rowId,sgrid,tgrid)

Required library edition:
Required library file: dhtmlxgrid_drag.js

redefine this method in your code to define how grid row values should be used in another grid

- rowId - id of draged row
- sgrid - source grid object
- tgrid - target grid object

Returns array of values for cells in target grid row

     grid.gridToGrid = function(rowId,sgrid,tgrid){
                var z=[];
                for (var i=0; i<sgrid.getColumCount(); i++)    // for each cell in the source grid
                    z[i]=sgrid.cells(rowId,i).getValue();         // prepare data for the target grid
                return z;
            }

See also: gridToTreeElement