Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIManipulating TreeNodes on the ClientManipulating TreeNodes on the Client
Previous
 
Next
New Post
8/30/2006 8:46 AM
 

OK, one last hurdle and then I can fully manipulate the treeview on the client.  Deleting tree nodes.

As you can see below I cannot actually get the treenode to be removed from the treeview.  I think its because I am not getting a reference to the proper object and probably I am not using the right function to remove it.  Any input you can provide would be appreciated.

function CHAS_DeleteTrvNode(strTrvClientID, strParentID, strNodeID)
{
   //alert(strTrvClientID + ' , ' + strParentID + ' , ' + strNodeID);
   var oTree = dnn.controls.controls[strTrvClientID]; //obtain ref to dnntree 

   var oPNode = oTree.DOM.findNode('n', 'id', strParentID); //find the parent DNNNode
   if (oPNode != null)
   {
      var oPTNode = new dnn.controls.DNNTreeNode(oPNode); //Cast it to DNNTreeNode
      var oCNode = oTree.DOM.findNode('n', 'id', strNodeID); //find Child DNNNode
      if (oCNode != null)
      {
         var oCTNode = new dnn.controls.DNNTreeNode(oCNode); //Cast it to DNNTreeNode
         oPNode.removeChild(oCNode);
         oTree.update();
//update tree's xml so postback will persist
         var oPCtr = oTree.getChildControl(oPTNode.id, 'pctr'); //obtain ref the DIV Object
         var oCCtr = oTree.getChildControl(oCTNode.id, 'ctr'); //obtain ref the DIV Object

         document.removeChild(oCCtr);
         //oCCtr.remove;
         //alert(oTree + ' , ' + oCCtr);
         //oTree.removeChild(oCCtr);
       }
    }
}

 
New Post
9/11/2006 9:58 AM
 
If you could put your code up somewhere where I could run it and debug it I would have an easier time in assisting you.  Please provide me with a url.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIManipulating TreeNodes on the ClientManipulating TreeNodes on the Client


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out