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
865
Problem in checking whether a node is checked or not
posted

Hi,

 

   i have a problem in accessing the tree node which is checked in the server-side.  The following code has been written in the client-side javascript.

 

function treeDataStore_NodeChecked(treeId, nodeId, bChecked)
{
    var node = igtree_getNodeById(nodeId);

    var tree = igtree_getTreeById(treeId);
    var filecount = 0;

    if (node.getChecked())
    {
 
      
        if (node.hasChildren())
        {
            var childNode = node.getChildNodes();
       
            for (var i=0; i<childNode.length; i++)
            {
                childNodeIdea.setChecked(false);
            }
        }
        isChecked = "false";
       
    }
}

 

i am able to access the node that is checked in the client-side but not on the server-side. can u please tell me what is the problem in my code..

 

       Hashtable hsh_SelFiles = new Hashtable();
            int filecount = 0;

            //first move the files which have been selected
            NodeEnumerator enumor = new NodeEnumerator(treeDataStore, ParentNode);
            while (enumor.MoveNext())
            {
                if (enumor.Current.Checked)
                {
                    hsh_SelFiles.Add(filecount, enumor.Current.Text);
                    filecount++;
                }
            }

 

I want to see which nodes are checked and then i have to delete it from the tree. can anyone tell me how to do it?

 

thanks

jollyguy

 

  • 19308
    posted

    jollyguy,

    Not sure I'm following you completely. Are you checking the node on the client, and then trying to find out the checked state on the server?  This should work, as this is core functionality of the webtree.  I noticed that you're creating an enumerator from the data - what happens when you simply loop through the tree nodes on the tree (using code like you're doing on the client - node=node.Nodes[i[... etc.

    -Tony