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
690
copy all tree's node one tree to second tree
posted
hi all,Please suggest for copy whole nodes one tree to other tree. Those trees without data source.It’s better for me if both are shared.I am waiting for positive replay.

 

 

Parents
  • 69832
    Offline posted

    private void CopyNodes( UltraTree source, UltraTree destination )
    {
        if ( source == null || destination == null )
            throw new ArgumentNullException();

        destination.Nodes.Clear();

        foreach ( UltraTreeNode node in source.Nodes )
        {
            UltraTreeNode newNode = node.Clone() as UltraTreeNode;
            destination.Nodes.Add( newNode );
        }
    }

Reply Children