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
460
Copy and Paste Functions
posted

I have this written this code 

 if (tvMenu.SelectedNodes.Count > 0)

{

          tvMenu.CopySelectedNodes();

tvMenu.PasteNodes(tvMenu.SelectedNodes[0].Parent);

}

it works fine except for the fact that the Copy dose not seem to be copying the tag of all the tree nodes.  I store an object in there that when a user clicks on it, it needs that object to do several other things.  Is there a way to tell the copy command to copy the tag info as well.

  • 69832
    Suggested Answer
    Offline posted

    I just checked the code, and we are indeed copying the Tag over when the pasted node is created. The likeliest explanation is that the object that you are assigning to the Tag explanation is not marked with the [Serializable()] attribute and/or does not handle serialization/deserialization of itself.