forcing the treegrid to display plus

Due to the nature of my data I wanted to force the tree grid to dynamically load data when a node is expanded. So by default all my nodes would have a plus next to them then when you expand the node it queries my database and checks for sub items then loads them.

Is there a way to force a plus next to my nodes without loading in a fake child ?

Cheers

Nic

Yes, it possible. Please check tutorial here docs.dhtmlx.com/doku.php?id=dhtm … n_treegrid

But there is one limitation. It will not possible to open one or all nodes with API call, only with mouse click

Hi Olga,
I am using addRow to create my treegrid not xml or JSON. I understand that there is a child variable that i can set to 1 which does force the plus addRow(new_id,text,ind,parent_id,img,child) , however i can then not pick up the attempted expand with

mygrid.attachEvent("onOpenStart", function(nodeId,mode){ alert('change'); });
Any help would be great
Thanks
Nic

Try to use “onDynXLS” event:

grid.attachEvent(“onDynXLS”, function(start,count){
grid.addRow(…);
return false;
});

This event will be fired when you start to open node which children are not loaded yet.

docs.dhtmlx.com/doku.php?id=dhtm … t_ondynxls