Cloning Treenodes

Discussion in 'ASP .Net' started by Chris, Aug 8, 2008.

  1. Chris

    Chris Guest

    Hi All.

    I'm cloning a treenode, like so:

    TreeNode trNewTemp = new TreeNode();
    trNewTemp = ((((ICloneable)trTempNode).Clone()) as TreeNode);

    Now the cloning works- trNewTemp has the same content and properties
    as trTempNode. The problem is, the treenode I'm cloning has multiple
    childnodes, and childnodes of those childnodes.... it's about 6 deep.
    The cloned node only has the root level node, not the childnodes. Is
    there a way I can clone the whole treenode, without enumerating all
    six levels?
     
    Chris, Aug 8, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    290
  2. rune solheim
    Replies:
    0
    Views:
    249
    rune solheim
    Sep 24, 2003
  3. Sunny

    Expanding Treenodes dynamically on client side

    Sunny, Oct 6, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    164
  4. RodBillett

    TreeNodes - Soemtimes postback sometimes do not

    RodBillett, Dec 8, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    120
    RodBillett
    Dec 8, 2003
  5. Manfred Braun

    TreeView:treenodes not displayed

    Manfred Braun, Aug 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    129
    Manfred Braun
    Aug 23, 2004
Loading...

Share This Page