moves a row
srowId | string|number | the id of the source row (the row that will be moved or copied) |
trowId | string|number | the id of the target row (in the 'sibling' mode - the row after which the source row will be pasted, in the 'child' mode - the row that will be the parent for the source row in the specified grid) |
mode | string | "move" or "copy" |
dropmode | string | "sibling" or "child" (optional, "sibling" by default) |
sourceGrid | object | source grid object used for moving between grids (optional, current grid by default) |
targetGrid | object | target grid object used for moving between grids (optional, current grid by default) |
Available only in PRO Edition
//move row with id "row1" after row with id "row2"
myTreeGrid1.moveRowTo("row1","row2","move");
//copy row with id "row1" from treegrid[1] as child of row with id "row2" in treegrid[2]
var movedId=myTreeGrid1.moveRowTo("row1","row2","copy","child",myTreeGrid1,myTreeGrid2);
Details on the trowId parameter - the target row is: