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
85
UltraTreeNode.Clone() does not seem to copy the columnset cells
posted

Hi there,

I'm not sure what I'm doing wrong, but when I try to clone nodes from an ultra win tree with a column set containing 2 columns o another tree, the cells do not get cloned.  So the content of nodes with cells is lost.  I tried the following:

1- create a new tree, then cloned the node, that didn't work. 

2- create a new Win tree, added the columnsets from the main tree to the new one, then cloned the node, that didn't help

3- Set the view style of both trees to be the same, that didn't help

I read about using the memorystream approach and I might have to use, but I'm wondering why the cloning approach is not working, or if I'm missing something.

Please let me know if you have any ideas.

Thanks,

Danny

  • 71886
    Suggested Answer
    Offline posted

    Hello dmanso,

    This is what the clone method does - http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/.

    If you would like to copy the same structure from the tree into another tree you could use the stream as you already noticed:

        public partial class Form1 : Form

        {

            System.IO.MemoryStream stream1 = new System.IO.MemoryStream();

     

            public Form1()

            {

                InitializeComponent();

                this.ultraTree1.Nodes["Customers"].Cells["FirstName"].Value = "Bill";

                this.ultraTree1.Nodes["Customers"].Cells["LastName"].Value = "Smith";

     

                //Saving the hierarchical data from tree1 and loading to tree2

                ultraTree1.SaveAsBinary(stream1);

                stream1.Position = 0;

                ultraTree2.LoadFromBinary(stream1);

     

            }

        }

     

     

    Please note, we are making efforts to ensure all posts are addressed by an Infragistics expert. We believe that the other community members could benefit from this thread as well.

     

    Feel free to write me if you need further assistance.