<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;
}
}就是想点击根节点的复选框。。根节点下的子节点复选框自动选中 求高手请教
<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;
}
}就是想点击根节点的复选框。。根节点下的子节点复选框自动选中 求高手请教
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货