adds a new item into TreeView
id | string|number | the item's id |
text | string | the item's text |
parentId | string|number | the parent's id |
index | number | the item's index |
var myTreeview = new dhtmlXTreeView({
// treeview conf here
});
// adding the root item
myTreeView.addItem("1", "Books"); // id, text
// adding a first-level child
myTreeView.addItem("2", "Turned at Dark", "1"); // id, text, pId