Hi
I am using Telerik tree view control with checkboxs.
What i need is when i select the parent node it should select all the child's nodes like wise unselect also.
I am using this javascript code
function UpdateAllChildren(nodes, checked)
{
var i;
for (i=0; i<nodes.get_count(); i++)
{
if (checked)
{
nodes.getNode(i).check();
}
else
{
nodes.getNode(i).set_checked(false);
}
if (nodes.getNode(i).get_nodes().get_count()> 0)
{
UpdateAllChildren(nodes.getNode(i).get_nodes(), checked);
}
}
if ((nodes.get_count()==0) && (nodes._parent._parent._parent!=null) && (!checked))
{
nodes._parent._parent.set_checked(false);
}
}
if the selected node has more than 200 child Nodes (nodes.get_count() > 200) then i am always getting this error
Stop running this script a script on this page is causing Internet explore to run slowly.If it continue to run your computer may be unresponsive. How can i avoid this error
Regards
Vairamuthu
I am using Telerik tree view control with checkboxs.
What i need is when i select the parent node it should select all the child's nodes like wise unselect also.
I am using this javascript code
function UpdateAllChildren(nodes, checked)
{
var i;
for (i=0; i<nodes.get_count(); i++)
{
if (checked)
{
nodes.getNode(i).check();
}
else
{
nodes.getNode(i).set_checked(false);
}
if (nodes.getNode(i).get_nodes().get_count()> 0)
{
UpdateAllChildren(nodes.getNode(i).get_nodes(), checked);
}
}
if ((nodes.get_count()==0) && (nodes._parent._parent._parent!=null) && (!checked))
{
nodes._parent._parent.set_checked(false);
}
}
if the selected node has more than 200 child Nodes (nodes.get_count() > 200) then i am always getting this error
Stop running this script a script on this page is causing Internet explore to run slowly.If it continue to run your computer may be unresponsive. How can i avoid this error
Regards
Vairamuthu