Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1615
ultratree remove node
posted

I have an Ultratree that is NOT bound to a datasource. I load the nodes recurrsively via nodes.add. When a node is selected, I allow the user to delete the data linked to the node. I delete the data in sql based on the key of the node and then I try to remove the node from the tree and make the parent node of the deleted node active. I have tried using

Ultratree1.Nodes.Remove(Ultratree1.ActiveNode)

It errs on this line saying the "The node cannot be removed because it does not belong to this collection."

I debug on this line at runtime and I verify that the ActiveNode key is in the ultratree1.nodes collection, so I am not sure why this will not tremove the node. What is the proper way to do this?