Hi,
I am facing a problem while deleting node from a tree.
I have a tree which has suppose 5 childs:
-Root
+C1
+C2
-C3
+CC1
+C4

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)
{
alert("item:"+item.text+"id"+item.id);
if(item != my.id){
delnode.removeChild(item);
}

});

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