A "global" setItemImage() function?

Is there a function similar to grid.setItemImage() that can globally set the TreeGrid image for all Items without having to specify the Item IDs?
For example, setDefaultImage(url)?

At present, it appears that I would have to either specify the same image for each row in my TreeGrid tree, or edit “leaf.gif”.

If I missed it in the documentation, please show me the error of my ways… :slight_smile:

Similarly, it would be nice to have a single function that could, at the initial setup, specify open, closed, and childless images for all nodes in the TreeGrid, as there is in Tree. Indeed, if most of the Tree functions were available for trees in a TreeGrid, that would be quite useful.

Maybe you could leverage the code already written for Tree and incorporate it (as a superclass maybe?) into the TreeGrid? Just a thought for future development… wouldn’t want you guys to get bored… :mrgreen:

Is there a function similar to grid.setItemImage() that can globally set the TreeGrid image for all Items without having to specify the Item IDs?
There is no such functionality. But you can use forEachRow() and forEachChild() to iterate over all rows in TreeGrid. Please check tutorial here docs.dhtmlx.com/doku.php?id=dhtm … terating&s[]=forEachRow#iteration_through_treegrid

Similarly, it would be nice to have a single function that could, at the initial setup, specify open, closed, and childless images for all nodes in the TreeGrid, as there is in Tree
Also, you can use forEachRow() method.
You can open treeGrid node with “open” attribue of row tag:

Yes, I was hoping to avoid going through the iterative process. But, that’s ok. Thanks for your help.