in case of dhtmlxTreeGrid you can attach an event which will fire on expanding/collapsing nose
grid.setOnOpenStartHandler(function(id){
//any custom code here
});
to autoselect on open you can use
grid.setOnOpenStartHandler(function(id){
grid.setSelectedRow(id);
});
this will work for both expanding|collapsing
>>which function is actually called
There is no hardcoded functions, but you can use described approach to attach any custom reactions on node expanding|collapsing
In case of dhtmlxTree - approach is the same, but the names slightly different
tree.attachEvent(“onOpenStart”,function(id){
//any custom code here
});
for auto selection
tree.attachEvent(“onOpenStart”,function(id){
tree.selectItem(itemId);
});