tree.getSubItems(itemId) question


According to the DHTMLx Tree documentation, this line will return a list of sub items in comma separated. It there a way to retrieve the sub item list in a pipe separated or any character.

var subItems = tree.getSubItems(itemId);

You can use JavaScript split() function:

var subItems = tree.getSubItems(itemId).split(",");

Yes, we can retrieve the list on that way. What I mean is, is there a way to retrieve the Sub Items in a different separator.


var subItems = tree.getSubItems(itemId, ‘$’).split(’$’);

We ask this because, we have data in our tree that are contains comma.

You can use setDelimiter() method … tdelimiter