# dhtmlxtree:api_method_dhtmlxtreeobject_moveitem [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxtree
API Methods

### moveItem(itemId,mode,targetId,targetTree)

Required library edition:
Required library file: dhtmlxtree.js

move item (inside of tree)

- itemId - item Id
- mode - moving mode (left,up,down,item_child,item_sibling,item_sibling_next,up_strict,down_strict)
- targetId - target Node in item_child and item_sibling mode
- targetTree - used for moving between trees (optional)