Accordions within PopUpControlExtender

Rate It (1)

Last post 03-16-2007 6:15 PM by Yeti2mil. 3 replies.

Sort Posts:

  • Accordions within PopUpControlExtender

    11-03-2006, 11:01 AM
    • Loading...
    • GURU@SIS
    • Joined on 11-03-2006, 3:39 PM
    • Posts 4

    I ve a got a pop up extender thats attached to a textbox and has a div that contains a number of accordions as its pop up control, the problem am having is when the popup appears for the 1st time the accordions donot render properly and its behaviour is not as when it is not attached to the popup extender, it is not until I do a partial postback from a button click on the accordion that they start behaving as expected. I donot understand why, ive tried everything but it dont seem to work my code is posted below : 

     

     

    <%

    @ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%

    @ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

    <%

    @ Register Assembly="ScrollingGrid" Namespace="AvgControls" TagPrefix="cc2" %>

    <!

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <

    html xmlns="http://www.w3.org/1999/xhtml" >

    <

    head runat="server">

    <title>Untitled Page</title>

    <style>

    .accordionContent

    {

    background-color: #D3DEEF;

    border: 1px dashed #2F4F4F;

    border-top: none;

    padding: 5px;

    padding-top: 20px;

    }

     

    .accordionHeader

    {

    border: 1px solid #2F4F4F;

    color: white;

    background-color: #2E4d7B;

    font-family: Arial, Sans-Serif;

    font-size: 12px;

    font-weight: bold;

    padding: 5px;

    margin-top: 5px;

    cursor: pointer;

    }

    </style>

     

    </

    head>

    <

    body>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

     

    <asp:UpdatePanel runat="server" ID="UpdatePanel2">

    <ContentTemplate>

    <asp:TextBox runat=server ID="TextBox_3">

    </asp:TextBox>

    <cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" PopupControlID="Div1" TargetControlID="TextBox_3" Position=Right>

    </cc1:PopupControlExtender>

    </ContentTemplate>

    </asp:UpdatePanel>

     

    <div style="border:1px outset white; width:400px;height:400px;" id="Div1">

    <asp:UpdatePanel runat=server ID="UpdatePanel1">

    <ContentTemplate>

    <cc1:Accordion ID="Accordion2" runat="server" AutoSize=None SelectedIndex="1" ContentCssClass="accordionContent" HeaderCssClass="accordionHeader">

    <Panes>

    <cc1:AccordionPane ID="AccordionPane3" runat="server">

    <Header><a href="" onclick="return false;">Address Finder</a></Header>

    <Content>

    <table class="table">

    <tr>

    <td>PostCode:

    </td>

    <td><asp:textbox id="postCodeInputTxtBx" Runat="server"></asp:textbox></td>

    <td><asp:button id="Button1" runat="server" Text="Find"></asp:button></td>

    </tr>

    <TR>

    <TD colSpan="3">

    <HR>

    &nbsp;</TD>

    </TR>

    <TR>

    <TD colSpan="3"><asp:label id="Label1" Runat="server">Select an item from the list below to retrieve the address</asp:label></TD>

    </TR>

    <TR>

    <TD colSpan="3" style="HEIGHT: 10px">

    </TD>

    </TR>

    <TR>

    <TD colSpan="3"><asp:label id="errorLabel" runat="server" Width="360px"></asp:label></TD>

    </TR>

    <tr>

    <td>Address </td>

    <td colspan=2>

    <asp:TextBox ID=TextBox_Address runat="server"></asp:TextBox>

    </td>

    </tr>

    <TR>

    <TD>SubRegion Code</TD>

    <TD colSpan="2"><asp:textbox id="subregionTextBox" runat="server" Width="88px" ReadOnly="True"></asp:textbox></TD>

    </TR>

    <TR>

    <TD>SubRegion Name

    </TD>

    <TD colSpan="2"><asp:textbox id="districtNameTextBox" runat="server" Width="88px" ReadOnly="True"></asp:textbox></TD>

    </TR>

    <tr>

    <td colspan=3 align="center">

    <asp:Button ID="Button2" Text="Set" runat="server" />

    </td>

     

    </tr>

    </table>

    </Content>

    </cc1:AccordionPane>

    <cc1:AccordionPane ID="AccordionPane4" runat="server">

    <Header><a href="" onclick="return false;">Manual Select</a></Header>

    <Content>

    SubRegionsList

    <br />

    <asp:DropDownList ID="DropDownSubRegionList" runat="server"></asp:DropDownList>

    <asp:Button Text="Set" runat="server" />

    </Content>

    </cc1:AccordionPane>

    </Panes>

    </cc1:Accordion>

    </ContentTemplate>

    </asp:UpdatePanel>

    </div>

     

    </form>

    </

    body>

    </

    html>
  • Re: Accordions within PopUpControlExtender

    11-07-2006, 5:40 AM
    • Loading...
    • GURU@SIS
    • Joined on 11-03-2006, 3:39 PM
    • Posts 4
    Has no one ever had this issue.. maybe some1 can suggest a better way for me to approach this?
  • Re: Accordions within PopUpControlExtender

    11-10-2006, 3:21 PM
    • Loading...
    • Radderz
    • Joined on 03-08-2005, 5:29 AM
    • Hastings, UK
    • Posts 7

    Yep, someone else has had this problem at last!

    I see what you mean, I thought it just wasn't working point blank, but as soon as you initiate a postback, it works fine. I guess as a quick fix, a postback could be forced by using a timer control, but this is far from ideal.

    Does anyone know if this is a reported bug/issue?
     

    ---- Thanks, Radderz
  • Re: Accordions within PopUpControlExtender

    03-16-2007, 6:15 PM
    • Loading...
    • Yeti2mil
    • Joined on 03-16-2007, 6:04 PM
    • Posts 1

    I'm not sure if this is what have happened to all, but here is what happened to me, and how I "solve" it:
     I have a javascript on <body onload... that displays a "Waiting" animated GIF and a message that says "Pleas wait".
    When the page has finished loading, the message and the GIF dissapears.

     Now,,,,,, with the CollapsiblePanelExtender,,, something weird has happened.
    I have a page with the CollapsiblePanelExtender, the "Loading" javascript and a GridView with EditItemTemplate in it.

    Sometimes (not always), the page has finished loading, but the "Loading" message remains in the page,,,and if I collapse the panel, it goes away and everything works fine so on.

    My temporal solution was simple and in my current scenario works for my purposes,,,,, Since everything works fine after I collapse the panel, what I did was to add this line of code at the end of the Page_Load

    Me

    .cpeHeader.Collapsed = True

    (where cpeHeader = CollapsiblePanelExtender)

    Since I don't have a problem having the panel collapsed when the page loads, I can live with this.............

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter