move

moves an item to a new position

string|number move(id sid,number tindex, [object tobj,object details] );
sididthe id of the source item
tindexnumbera new item index
tobjobjectthe target view
detailsobjectextra parameters for moving
string|numberthe id of a moved item (a new id, if it was changed)
Details

The details object can contain the following properties:

details = {};
details.newId = "123"; // a new id for the moved item
details.parent = "a2"; // the id of a new parent element

If the parent is defined, tindex will be the child index inside the target branch.

If the parent is not defined, the value will be set to 0 (will be added to the tree root).

In case newId is not defined, the new ID will be the same as the ID of the source item (sid), which is not desirable while moving takes place within one and the same component.

Back to top
If you have not checked yet, be sure to visit site of our main product Webix widget library and page of javascript tree table product.