Hi,
There is a scenario like, I have a tree folders and I want to add new folder tree to an existing one.
Please help me.
Thanks in advance.
If you want to add a folder to the datatree dynamically, you need to customize “folder” and “icon” templates in the configuration of your tree, so that they could display folder and open/close icons in two cases:
- if an item has child items and it is not opened (“open” property is not set). It is present in the built-in template;
- if data item has some property that marks it as folder item (for example “type”: “folder”).
http://webix.com/snippet/11839e51
If you need to add another piece of hierarchical data to the existing tree (while creating folders and items respectively), you may parse this data to the needed parent item of the tree.