TreeNode remove method dosen't work

Discussion in 'ASP .Net Web Controls' started by Hitesh, Nov 11, 2003.

  1. Hitesh

    Hitesh Guest

    Hi all,
    following is the client side javascript code I've written
    to delete some nodes on treeview.
    -----------------
    var oTreeNode = TreeViewControl.getTreeNode(NodeIndex)
    var oCNodes = oTreeNode.getChildren();

    alert(oCNodes[0].getNodeIndex());
    //Above line shows correct index.

    oCNodes[0].remove();
    //Above line doesn't work if oTreeNode collapsed.

    -------------------
    The remove method in above code doesn't work if the
    oTreeNode is not expanded. I tried to expand it using
    oTreeNode.setAttribute("EXPANDED",true); method. but It is
    not working either.

    Any ideas how can I expand the node and then remove it's
    child nodes?

    Regards,
    Hitesh
     
    Hitesh, Nov 11, 2003
    #1
    1. Advertisements

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. ALI-R
    Replies:
    4
    Views:
    20,491
    ALI-R
    Feb 14, 2005
  2. Ray5531

    one of my pages dosen't get debugged.

    Ray5531, May 4, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    394
    Ray5531
    May 4, 2005
  3. Michael

    pix maker dosen't work

    Michael, Jun 2, 2004, in forum: HTML
    Replies:
    8
    Views:
    973
    Michael
    Jun 2, 2004
  4. tanya foster
    Replies:
    3
    Views:
    4,001
    tanya foster
    May 18, 2006
  5. =?Utf-8?B?U3Vieml6bw==?=
    Replies:
    0
    Views:
    648
    =?Utf-8?B?U3Vieml6bw==?=
    Nov 28, 2006
  6. Steve Kershaw
    Replies:
    0
    Views:
    658
    Steve Kershaw
    Sep 25, 2007
  7. suddy
    Replies:
    1
    Views:
    523
    Michael Nemtsev
    Oct 4, 2007
  8. John Devlon

    remove selected treenode

    John Devlon, Apr 21, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    465
    John Devlon
    Apr 21, 2008
Loading...