Check documentation for the latest version of dhtmlxSuite insertNewChild DHTMLX Docs


creates a new node as a child to the specified one with parentId

void insertNewChild(string|number parentId,string|number id,string text, [function actionHandler,string image1,string image2,string image3,string optionStr,mixed children] );
parentIdstring|numberparent node's id
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


myTree.insertNewChild("my_parent_11","11_1","item 11");

Back to top