我有一个asp.net treeView。在扩展的节点上,我正在为扩展节点绑定子节点。但是如果我检查节点而不是展开节点,那么节点及其所有子节点就会改变位置并变成主节点的子节点。当再次点击+时,它就是正确的位置。关于如何解决它的任何想法!!!
<asp:Panel ID="pnl_tree_testplan" CssClass="pnl_treeview" runat="server" ScrollBars="Auto">
<asp:UpdatePanel ID="treeview_testplan" runat="server">
<ContentTemplate>
<asp:TreeView ID="testPlanTreeView" runat="server" OnLoad="Tree_TestPlan_Load" OnTreeNodeExpanded="Tree_TestPlan_Node_Expanded"
OnTreeNodeCheckChanged="TestPlan_Treeview_TreeNodeCheckChanged">
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
.pnl_treeview
{
Height:410px;
border-width:1px;
border-color:Blue;
min-width:260px;
width:100%;
font-family:Calibri;
font-size:small;
color:Black;
}
答案 0 :(得分:0)
当你将鼠标悬停在节点上时,如果它在Firefox(特别是)中“上下跳跃”,请尝试此CSS修复:
<div id="idTreeView">
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1"
HoverNodeStyle-Height="0" Font-Bold="true" ImageSet="BulletedList">
<RootNodeStyle Font-Bold="True" />
<ParentNodeStyle VerticalPadding="0px" Font-Bold="True"
Font-Underline="false" />
<HoverNodeStyle Font-Underline="false" ForeColor="#5555DD" />
<NodeStyle Font-Bold="False" Font-Size="8pt" CssClass="sitelink"
ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px"
VerticalPadding="0px" />
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
div#idTreeView img
{
display: block;
float: left;
}
div#idTreeView div
{
display: inline-block;
}
div#idTreeView .sitelink a
{
text-decoration:none;
}