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
40
UltraTree Clone not working
posted

Hi,

    I created UltraTree and i added several node. I have two combo for selection. Based on the combo selection i creating the new ultra tree and just i assign the tree and i added that tree to List<ultraTree>.

I did n't find any clone method. I filling the tree's Tag with custom call. I will find the tree based on the combo selection using tree's Tag. Just i creating and add the new tree to collection if the tree is not exist.

 

My problem is, Its just showing the first created tree always

This the code sample, what is the problem here

 SelectedDeviceState treeState = new SelectedDeviceState(firstDevice, secondDevice);
                        UltraTree tree = new UltraTree();
             
                        foreach (UltraTreeNode nod in tvwNavigation.Nodes)
                        {
                            UltraTreeNode tnode = nod.Clone() as UltraTreeNode;
                            tree.Nodes.Add(tnode);
                        }
                 

                        tree.Tag = treeState;
                       
                        tvwNavigation = tree;
                        _treeCollection.Add(tree);