Check documentation for the latest version of dhtmlxSuite moveRow DHTMLX Docs

moveRow

moves a row

void moveRow(string|number rowId,string mode, [string|number targetId,object targetGrid] );
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
myTreeGrid1.moveRow("row1","up");
//move row down
myTreeGrid1.moveRow("row1","down");
//put row with id "row1" after row with the id "row2" in the treegrid[2]
myTreeGrid1.moveRow("row1","row_sibling","row2",myTreeGrid2);

Back to top