TreeView 中ShowCheckBoxes="All" 复选框事件怎么写!
全局变量 2009-11-23 05:55:37 <asp:TreeView ID="tvDepartment" runat="server" Height="215px" ImageSet="Inbox" Width="138px" ShowCheckBoxes="All" >
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" />
<SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px" />
<NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
//确定
protected void btnOKs_Click(object sender, EventArgs e)
{
//怎么判断是否是根节点
txtToEmail.Enabled = false;
foreach (TreeNode t in tvDepartment.CheckedNodes)
{
string dd = t.Text;
}
}
就是想点击根节点的复选框。。根节点下的子节点复选框自动选中 求高手请教