RadTreeView for ASP.NET

Checking only one TreeNode Send comments on this topic.
Example scenarios (How to) > Client -side > Checking only one TreeNode

Glossary Item Box

To accomplish the task you can hook on the AfterClientCheck event and uncheck all TreeNodes except the TreeNode that has been checked last.

Example:

ASPX Copy Code
<script>
   
function AfterCheck(node)
   {
     var i;
     var nodes = node.TreeView.AllNodes;
     for(i=0; i
<nodes.length; i++)
     {
       if(nodes[i] != node)
       nodes[i].UnCheck();
     }
   }
<
/script>

<
rad:RadTreeView
   
ID="RadTreeView1"
   
runat="server"
   
CheckBoxes="True"
   
AfterClientCheck="AfterCheck"/>