Hi,
I am using the UltraTree in v8.3. My tree nodes have the Tag property set to a custom object so I can attach meta data to each tree node.When I create the tree nodes, I also create my tag object and set it to the tree node Tag property.
After my nodes are created, I use LoadFromXml to load the node structure saved from last time.
When I use LoadFromXml, it seems to set each tree nodes Tag property to null.
Is there a way I can avoid this? I still need to use LoadFromXml, but I need it to ignore my Tag property.
By the way, I did read a post saying that my custom object should implement Serializable, but I can't use this method, since I don't want to persist the Tag object between sessions. I create this object dynamically and it only applies to the current session.
I guess a workaround would be to save my tag objects before the load, then set them again after the load?
The reason it is getting nullified is in fact because it doesn't implement ISerializable (or more preceisly because it doesn't support serialization of itself). I would think the easiest solution here would be to apply this custom object to the Tag property after you call LoadFromXml.
Thanks for this.
I managed to avoid implementing serializble by temporarily storing the tag objects locally, then reapplying them after the load had finished.