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++) { childNode.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
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