0

我有一个 asp.net 树视图。在展开的节点上,我正在为展开的节点绑定子节点。但是如果我检查节点而不是展开它,节点和它的所有子节点都会改变位置并变得像主节点的子节点。再次单击 + 时,它会出现在正确的位置。任何想法如何解决它!

  <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;           
             }
4

1 回答 1

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;
}
于 2012-11-02T05:11:17.520 回答