dynamic accordion inside a tabPanel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • axxon
    New Member
    • Jul 2007
    • 6

    dynamic accordion inside a tabPanel

    hi, I am having a huge problem here!
    the scenario is i am trying to create dynamic accordion Panes to a accordion control inside a tab panel in a content page. It works just fine in a regular webform page which does not use a master page. but if i try to add dynamic accordion panes to a accordion inside a tab panel, it stops working. but I hav tested i can use static accordion panes jsut fine.

    here is my code:

    //////////// tab /////////////////
    <ajaxToolkit:Ta bPanel runat="server" ID="TabPanel1" HeaderText="Log off">
    <ContentTemplat e>
    <ajaxToolkit:Ac cordion ID="MyAccordion " runat="server" SelectedIndex=" 0"
    HeaderCssClass= "accordionHeade r" HeaderSelectedC ssClass="accord ionHeaderSelect ed"
    ContentCssClass ="accordionCont ent" FadeTransitions ="false" FramesPerSecond ="40"
    TransitionDurat ion="250" AutoSize="None" RequireOpenedPa ne="false" SuppressHeaderP ostbacks="true" >
    <Panes>

    <ajaxToolkit:Ac cordionPane ID="AccordionPa ne1" runat="server">
    <Header><a href="" class="accordio nLink">Log Off </a></Header>
    <Content>
    <asp:LinkButt on ID="logoff" runat="server" OnClick="logoff _Click">Log Off Admin</asp:LinkButton> &nbsp;
    <ajaxToolkit:Co nfirmButtonExte nder ID="LogOffConfi rmButton" runat="server" TargetControlID ="logoff" ConfirmText="Ar e you sure you want to log off ?">
    </ajaxToolkit:Con firmButtonExten der>
    </Content>
    </ajaxToolkit:Acc ordionPane>
    </Panes>
    </ajaxToolkit:Acc ordion>
    </ContentTemplate >
    </ajaxToolkit:Tab Panel>

    thisone works just fine....since the accordion pane there is static! but when i try to add it dynamically..th ey do not show up
    /////////////////////////////////////////////////
    protected void loglff()
    {
    AccordionPane logoffPane = new AccordionPane() ;
    logoffPane.Head erContainer.Con trols.Add(new LiteralControl( "logoff"));
    LinkButton l = new LinkButton();
    l.Text = "logoff";
    logoffPane.Cont entContainer.Co ntrols.Add(l);

    MyAccordion.Pan es.Add(logoffPa ne);
    }

    ////////////////
    any help wil b much appreciated...
    thank you in advance!
Working...