User-1159509665 posted
Hi Jeff,
Please checkout my sample
here
Note: expand "Music" node, you can see we can not check "Classical" node.
Here is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Tree2.aspx.cs" Inherits="_Tree2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="TreeView.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="SimpleTreeView.css" type="text/css" />
<script type="text/javascript" src="CascadeCheckmarks.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TreeView ID="EntertainmentTreeView" runat="server"
OnClientClickedCheckbox="CascadeCheckmarks(event)"
CssSelectorClass="SimpleEntertainmentTreeView"
ExpandDepth="0"
ShowCheckBoxes="All">
<Nodes>
<asp:TreeNode Text="Music" ShowCheckBox="false">
<asp:TreeNode Text="Classical" />
<asp:TreeNode Text="Rock">
<asp:TreeNode Text="Electric" />
<asp:TreeNode Text="Something without a checkbox" ShowCheckBox="false" SelectAction="None" />
<asp:TreeNode Text="Acoustical" />
</asp:TreeNode>
<asp:TreeNode Text="Jazz" />
</asp:TreeNode>
<asp:TreeNode Text="Movies">
<asp:TreeNode Text="Action" />
<asp:TreeNode Text="Drama" />
<asp:TreeNode Text="Musical" />
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</div>
</form>
</body>
</html>
Eric.