G
Guest
Hi All,
I have a treeView control, the treeview is generated from DB.
I need to write a function to remove some invalid treenodes in the tree.
for (int i=0; i < treeviewCtrl.count.... )
....
....
if (invalid)
treeviewCtrl.Nodes.RemoveAt(i);
i know the problem is, when the node is removed, the other sublings' index
will be changed.
so how can I avoid this ?
thanks a lot!!!
I have a treeView control, the treeview is generated from DB.
I need to write a function to remove some invalid treenodes in the tree.
for (int i=0; i < treeviewCtrl.count.... )
....
....
if (invalid)
treeviewCtrl.Nodes.RemoveAt(i);
i know the problem is, when the node is removed, the other sublings' index
will be changed.
so how can I avoid this ?
thanks a lot!!!