Check documentation for the latest version 6.0 of dhtmlxSuite moveRow DHTMLX Docs

moveRow

moves a row

void moveRow(string|number rowId,string mode, [string|number targetId,object targetGrid] );

Parameters

rowIdstring|numberthe id of the source row (the row that will be moved)
modestringmoving mode ("up","down","row_sibling")
targetIdstring|numberused just in the "row_sibling" mode. The id of the target row (the row after which the source row will be pasted) (optional)
targetGridobjectused for moving between grids (optional)

Available only in PRO Edition

Example

//move row up
myGrid1.moveRow("row1","up");
//move row down
myGrid1.moveRow("row1","down");
//put row with id "row1" after row with the id "row2" in the grid[2]
myGrid1.moveRow("row1","row_sibling","row2",myGrid2);

Back to top