i have an asp.net treeView. on node exp以及ed i m binding child nodes for the exp以及ed node. But if i check the node 以及 than exp以及 it, the node 以及 all it s child change there position 以及 become like childs to the main node. when clicking again on the + it takes the right place. Any idea on how to solve it!!!
the树在更新中 小组
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TreeView ID="MyTreeView" runat="server" ImageSet="XPFileExplorer" NodeIndent="15"
OnTreeNodeExp以及ed="MyTreeView_TreeNodeExp以及ed">
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
NodeSpacing="0px" VerticalPadding="2px" />
<ParentNodeStyle Font-Bold="False" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
VerticalPadding="0px" />
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
from the code behind: on page load i have :
if (!this.IsPostBack)
{
this.MyTreeView.ShowCheckBoxes = TreeNodeTypes.All;
this.MyTreeView.ShowLines = true;
FillTree();//custom method just to fill the tree
}
以及
protected void MyTreeView_TreeNodeExp以及ed(object sender, TreeNodeEventArgs e)
{
TreeNode exp以及edNode = e.Node;
if (exp以及edNode.Value != "-1" && exp以及edNode.Value == "-2")
{
//Some logic
}
}
预 收