Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by jecoso on Nov 09, 2009 17:52
open dhtmlx forum
DHTMLXTree: How to hide a node in a dhtmlxTree ?

In my tree, if some one select a node, and press delete node button, I do not want the node to be really deleted, I need it just hide.
Is there any method?

I have try setItemStyle(itemId,style_string), but I can only hide the node text, not the whole node including the lines before the node.

Thanks you very much.
Answer posted by Alex (support) on Nov 10, 2009 02:10

Hello, 

tree doesn't support this functionality.

But you can try to use the following approach.. possibly it is what you need:

var item = tree._idpull[itemID]; 

var itemRow = item.span.parentNode.parentNode.parentNode;
itemRow.style.display="none";