Ajax accordion Control:On选择窗格中的链接会自动从当前窗格中丢失焦点

时间:2012-08-16 15:36:43

标签: asp.net ajax accordion

enter image description here

我不知道这是一个非常简单的问题还是很难,但今天我遇到了这个问题。

我的主页上有Ajax Accordion控件,其中有三个Panes [灰色方块区域, Master ST ERP 文字是内容页面。)

现在,我的问题是每当我在用户详细信息窗格中选择链接表示为树时,它就会自动折叠并自动打开 ST-ERP模块窗格。 这让我很沮丧...... 应该是什么问题的朋友... 关于SO的同样问题,但无法帮助我:Ajax Accordion Loses Current Pane

这是我的代码段:

<ajax:Accordion ID="UserAccordion" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeader"
                            HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                            FadeTransitions="true" SuppressHeaderPostbacks="true" TransitionDuration="250"
                            FramesPerSecond="40" RequireOpenedPane="false" AutoSize="None" 
                            Width="220px">
                            <Panes>
                                <ajax:AccordionPane ID="AccordionPane1"  runat="server">
                                    <Header>
                                        <a href="#" class="href">ST-ERP Modules</a></Header>
                                    <Content>
                                        <asp:Panel ID="UserReg" runat="server">
                                            <asp:TreeView runat="server" ID="treeMainMenu" DataSourceID="SiteMapDataSource1"
                                                NodeIndent="10" Width="150px" OnTreeNodeDataBound="treeMainMenu_TreeNodeDataBound">
                                                <ParentNodeStyle Font-Bold="False"></ParentNodeStyle>
                                                <HoverNodeStyle ForeColor="#447BD4" Font-Underline="True"></HoverNodeStyle>
                                                <SelectedNodeStyle HorizontalPadding="0px" ForeColor="#DD5555" VerticalPadding="0px"
                                                    Font-Bold="True" Font-Underline="True"></SelectedNodeStyle>
                                                <NodeStyle NodeSpacing="0px" HorizontalPadding="0px" ForeColor="#447BD4" VerticalPadding="0px"
                                                    Font-Size="8pt" Font-Names="Verdana"></NodeStyle>
                                            </asp:TreeView>
                                        </asp:Panel>
                                    </Content>
                                </ajax:AccordionPane>
                                <ajax:AccordionPane ID="AccordionPane2" runat="server">
                                    <Header>
                                        <a href="#" class="href">User Detail</a></Header>
                                    <Content>
                                        <asp:Panel ID="Panel1" runat="server">
                                            <asp:TreeView runat="server" ID="TreeView1" DataSourceID="SiteMapDataSource2" NodeIndent="10"
                                                Width="150px">
                                                <ParentNodeStyle Font-Bold="False"></ParentNodeStyle>
                                                <HoverNodeStyle ForeColor="white" Font-Underline="True"></HoverNodeStyle>
                                                <SelectedNodeStyle HorizontalPadding="0px" ForeColor="#DD5555" VerticalPadding="0px"
                                                    Font-Bold="True" Font-Underline="True"></SelectedNodeStyle>
                                                <NodeStyle NodeSpacing="0px" HorizontalPadding="0px" ForeColor="White" VerticalPadding="0px"
                                                    Font-Size="8pt" Font-Names="Verdana"></NodeStyle>
                                            </asp:TreeView>
                                        </asp:Panel>
                                    </Content>
                                </ajax:AccordionPane>
                                <ajax:AccordionPane ID="AccordionPane3" runat="server">
                                    <Header>
                                        <a href="#" class="href">Job Details</a>
                                    </Header>
                                    <Content>
                                        <asp:Panel ID="Panel2" runat="server">
                                            ddddddddddddd</asp:Panel>
                                    </Content>
                                </ajax:AccordionPane>
                            </Panes>
                        </ajax:Accordion>

0 个答案:

没有答案