move of DataMove, Methods Webix Docs

moves the specified item to a new position

string move(string sid,number tindex, [object tobj,object details] );

stringthe ID of the item to move tindex
numbera new position of the item (a new index) tobj
objectthe object that the item is moved to detailsobjectextra parameters for moving

Example

// moving in the same list
$$("list").move("a12", 0);
$$("list").move("a13", -1);
 
// moves an item to a different list
var id = $$("list").move("a13", 0, $$("list2"), {newId:"b13"});

Details

The details object can contain the following properties:

details = {};
details.newId = "123"; // a new ID for the moved item

Note that in case newId is not defined, the new ID will be the same as the ID of the source item (sid).

See also

Back to top