Check documentation for the latest version of dhtmlxSuite insertNewNext DHTMLX Docs

insertNewNext

creates a new node next to the specified one

void insertNewNext(string|number nextToId,string|number id,string text, [function actionHandler,string image1,string image2,string image3,string optionStr,mixed children] );
nextToIdstring|numberid of the node after which a new item will be inserted
idstring|numbernew node's id
textstringnew node's label
actionHandlerfunctionfunction fired on clicking an item, optional
image1stringimage for a node without children, optional
image2stringimage for a closed node, optional
image3stringimage for an opened node, optional
optionStrstringoptions' string, optional
childrenmixednode children flag (for dynamic trees), optional

Example

myTree.insertNewNext("my_node_11","11_1","item 11");

Back to top