I am facing a problem while deleting node from a tree.
I have a tree which has suppose 5 childs:

Now my requirement is that when I click on CC1 then C1, C2, C4 should be remomved from "Root".
I tried using this code in tree.onClick :

Ext.each(delnode.childNodes, function(item)
if(item != my.id){


Now the problem is : Its deleting alternate nodes i.e. it will delete C1 then leave C2, then delete C4. I tried it several times but its not picking every node.

Please suggest something quickly...........
Thanks in advance