Folks could someone please elaborate on what exactly the set_checkable node method is supposed to do. It does not seem to work or achieve anything. I have just loaded the latest build 2008.2.1001.20 hoping it would but to no avail.
I wanted to be able to hide or show the node checkbox client side depending on some arbitrary criteria.
To get this to work I had to set the checkable property of all the nodes to true server side. Then using the OnClientLoad event I traverse through all the nodes and as follows.
var treeView = $find("<%=radTreeView_Level.ClientID %>");
if(treeView)
{
var nodeList = treeView.get_allNodes();
for(var i=0; i < nodeList.length; i++)
{
var node = nodeList[i];
if(node && node.get_level() > 0)
{
var chkbox = node.get_checkBoxElement();
if(node.get_checked())
{
chkbox.className = "rtChk";
}
else
{
chkbox.className = "hidden";
}
}
}
}
This works fine but seems to be a hack considering theres a set_checkable method that probably should do this for me.
Tks H
I wanted to be able to hide or show the node checkbox client side depending on some arbitrary criteria.
To get this to work I had to set the checkable property of all the nodes to true server side. Then using the OnClientLoad event I traverse through all the nodes and as follows.
var treeView = $find("<%=radTreeView_Level.ClientID %>");
if(treeView)
{
var nodeList = treeView.get_allNodes();
for(var i=0; i < nodeList.length; i++)
{
var node = nodeList[i];
if(node && node.get_level() > 0)
{
var chkbox = node.get_checkBoxElement();
if(node.get_checked())
{
chkbox.className = "rtChk";
}
else
{
chkbox.className = "hidden";
}
}
}
}
This works fine but seems to be a hack considering theres a set_checkable method that probably should do this for me.
Tks H