CollapsiblePanel problem?

Last post 12-06-2006 1:19 AM by manojmvp. 3 replies.

Sort Posts:

  • CollapsiblePanel problem?

    08-31-2006, 3:45 PM
    • Participant
      756 point Participant
    • jakvike
    • Member since 08-28-2003, 12:38 PM
    • Omaha, NE
    • Posts 171

    i am having an issue when clicking on a submit button,  I am new to the atlas framework.  After clicking submit, the collapsible panels controls within the Header panel become undefined. This disables the collapsible functionality. here is a snippet!

     

    <asp:panel id="Panel2" runat="server" >

    <%--<ContentTemplate>--%>

    <table style="width: 408px">

    <tr class="h3">

    <td>

    <h3>

    Document Type</h3>

    </td>

    <td style="text-align: right;">

    <asp:Label ID="Label1" runat="server"></asp:Label>

    </td>

    <td style="width: 31px">

    <asp:Image ID="Image1" runat="server" />

    </td>

    </tr>

    <tr>

    <td colspan="3">

    <hr />

    </td>

    </tr>

    </table>

    <%-- </ContentTemplate> --%>

    </asp:panel>

     

    <%--<Triggers>

    <atlas:ControlEventTrigger ControlID="btnTypes" EventName="Click" />

    </Triggers>--%>

    <atlas:UpdatePanel ID="Panel1" Mode="Conditional" runat="server">

    <ContentTemplate>

    <table style="width: 100%;">

    <tr>

    <td colspan="2">

    <h4>

    Current Subscriptions</h4>

    </td>

    </tr>

    <tr>

    <td colspan="2">

    <asp:ListBox ID="lstSubscriptionsByType" runat="server" Width="269px">

    </asp:ListBox>

    </td>

    </tr>

    <tr>

    <td>

    <h4>

    Types of Documents</h4>

    </td>

    <td>

    <h4>

    Delivery Channels</h4>

    </td>

    </tr>

    <tr>

    <td style="vertical-align: top; text-align: center; height: 114px;">

    <asp:RadioButtonList ID="RadioButtonList1" runat="server" DataSourceID="TypesDatasource"

    DataTextField="Name" DataValueField="Id" RepeatColumns="2">

    </asp:RadioButtonList></td>

    <td style="height: 114px; vertical-align: top; text-align: center;">

    <table style="width: 182px">

    <tr>

    <td style="vertical-align: top; text-align: left;">

    <asp:CheckBox ID="CheckBox1" runat="server" Text="Client" />

    </td>

    <td style="vertical-align: top; text-align: left;">

    <asp:CheckBox ID="CheckBox2" runat="server" Text="Email" OnCheckedChanged="CheckBox2_CheckedChanged" AutoPostBack="True"

    />

    </td>

    <td style="vertical-align: top; width: 54px; text-align: left;">

    <asp:CheckBox ID="CheckBox3" runat="server" Text="SMS" OnCheckedChanged="CheckBox3_CheckedChanged" AutoPostBack="True"

    />

    </td>

    </tr>

    <tr>

    <td style="text-align: left;" colspan="3">

    <table>

    <tr>

    <td>

    <asp:TextBox ID="TextBox1" runat="server" Enabled="false"></asp:TextBox>

    </td>

    <td>

    <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/exclamation.png" Visible="False" />

    </td>

    </tr>

    <tr>

    <td>

    <asp:TextBox ID="TextBox2" runat="server" Enabled="false"></asp:TextBox>

    </td>

    <td>

    <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/exclamation.png" Visible="False" />

    </td>

    </tr>

    </table>

    </td>

    </tr>

    </table>

    </td>

    </tr>

    <tr style="text-align: right;">

    <td colspan="2">

    <asp:Button ID="btnTypes" runat="server" OnClick="btnTypes_Click" Text="Submit Type"

    />

    </td>

    </tr>

    </table>

    </ContentTemplate>

    </atlas:UpdatePanel>

     

    <cc1:CollapsiblePanelExtender ID="cpe" runat="Server">

    <cc1:CollapsiblePanelProperties TargetControlID="Panel1" CollapsedSize="0" ExpandedSize="325"

    Collapsed="True" ExpandControlID="Panel2" CollapseControlID="panel2" ScrollContents="False"

    TextLabelID="Label1" CollapsedText="Show Details..." ImageControlID="Image1"

    ExpandedImage="~/images/minimize.png" CollapsedImage="~/images/maximize.png" SuppressPostBack="true" />

    </cc1:CollapsiblePanelExtender>

    Jake
    Filed under:
  • Re: CollapsiblePanel problem?

    08-31-2006, 5:20 PM
    • Participant
      756 point Participant
    • jakvike
    • Member since 08-28-2003, 12:38 PM
    • Omaha, NE
    • Posts 171
    Update: anything that is causing the page to  postback is more or less disabling the collapsible panel.  I actually have another one on the page that when the page is posted back the image shows a nice big ole' red X.  Your  help is appreciated Thanks!
    Jake
  • Re: CollapsiblePanel problem?

    09-01-2006, 2:59 PM
    • Contributor
      4,198 point Contributor
    • Ted Glaza [MSFT]
    • Member since 04-12-2006, 11:51 PM
    • Microsoft
    • Posts 847
    • AspNetTeam

    Hi,

    I'm not really sure what's causing your problem from what you posted, but I'd recommend you use an actual Panel as the target.  I tweaked your sample so I could run it, and none of the postbacks caused the CollapsiblePanel to stop working.

    <%@ Page Language="C#" %>
    <%@ Register
        Assembly="AtlasControlToolkit"
        Namespace="AtlasControlToolkit"
        TagPrefix="atlasToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        private void CheckBox2_CheckedChanged(object sender, EventArgs args)
        {
        }
    
        private void CheckBox3_CheckedChanged(object sender, EventArgs args)
        {
        }
    
        private void btnTypes_Click(object sender, EventArgs args)
        {
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server"><title>Test Page</title></head>
    <body><form runat="server"><div>
        <atlas:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true" />
    
        <asp:panel id="Panel2" runat="server" > 
            <table style="width: 408px">
                <tr class="h3">
                    <td><h3>Document Type</h3></td>
                    <td style="text-align: right;"><asp:Label ID="Label1" runat="server"></asp:Label></td>
                    <td style="width: 31px"><asp:Image ID="Image1" runat="server" /></td>
                </tr>
                <tr>
                    <td colspan="3"><hr /></td>
                </tr>
            </table>
        </asp:panel>
        
        <asp:Panel ID="Panel1" runat="server">
            <atlas:UpdatePanel ID="UpdatePanel" Mode="Always" runat="server">
                <ContentTemplate>
                    <table style="width: 100%;">
                        <tr>
                            <td colspan="2"><h4>Current Subscriptions</h4></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:ListBox ID="lstSubscriptionsByType" runat="server" Width="269px"></asp:ListBox>
                            </td>
                        </tr>
                        <tr>
                            <td><h4>Types of Documents</h4></td>
                            <td><h4>Delivery Channels</h4></td>
                        </tr>
                        <tr>
                            <td style="vertical-align: top; text-align: center; height: 114px;">
                                <asp:RadioButtonList ID="RadioButtonList1" runat="server"
                                    DataTextField="Name" DataValueField="Id" RepeatColumns="2"></asp:RadioButtonList>
                            </td>
                            <td style="height: 114px; vertical-align: top; text-align: center;">
                                <table style="width: 182px">
                                    <tr>
                                        <td style="vertical-align: top; text-align: left;">
                                            <asp:CheckBox ID="CheckBox1" runat="server" Text="Client" />
                                        </td>
                                        <td style="vertical-align: top; text-align: left;">
                                            <asp:CheckBox ID="CheckBox2" runat="server" Text="Email"
                                                OnCheckedChanged="CheckBox2_CheckedChanged" AutoPostBack="True" />
                                        </td>
                                        <td style="vertical-align: top; width: 54px; text-align: left;">
                                            <asp:CheckBox ID="CheckBox3" runat="server" Text="SMS"
                                                OnCheckedChanged="CheckBox3_CheckedChanged" AutoPostBack="True" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left;" colspan="3">
                                            <table>
                                                <tr>
                                                    <td>
                                                        <asp:TextBox ID="TextBox1" runat="server" Enabled="false" />
                                                    </td>
                                                    <td>
                                                        <asp:Image ID="Image2" runat="server"
                                                            ImageUrl="~/Images/exclamation.png" Visible="False" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:TextBox ID="TextBox2" runat="server" Enabled="false" />
                                                    </td>
                                                    <td>
                                                        <asp:Image ID="Image3" runat="server"
                                                            ImageUrl="~/Images/exclamation.png" Visible="False" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr style="text-align: right;">
                            <td colspan="2">
                                <asp:Button ID="btnTypes" runat="server"
                                    OnClick="btnTypes_Click" Text="Submit Type"/>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </atlas:UpdatePanel>
        </asp:Panel>
        
        <atlasToolkit:CollapsiblePanelExtender ID="cpe" runat="Server">
            <atlasToolkit:CollapsiblePanelProperties TargetControlID="Panel1"
                CollapsedSize="0" ExpandedSize="325"
                ExpandControlID="Panel2" CollapseControlID="panel2"
                Collapsed="True" ScrollContents="False"
                TextLabelID="Label1" ImageControlID="Image1"
                CollapsedText="Show Details..."
                ExpandedImage="~/images/minimize.png"
                CollapsedImage="~/images/maximize.png"
                SuppressPostBack="true" />
        </atlasToolkit:CollapsiblePanelExtender>
    </div></form></body>
    </html>

    Thanks,
    Ted
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: CollapsiblePanel problem?

    12-06-2006, 1:19 AM
    • Member
      10 point Member
    • manojmvp
    • Member since 12-05-2006, 11:58 PM
    • Colombo, Sri Lanka
    • Posts 2

    I have the same problem in FIREFOX <- Angry and I'm using "actual" Panels (with Datagrids inside it). When a postback (ex: Save Button or a Datagrid sort inside the panel) takes place, the panels all lose the collapse/expand functionality and the image to collapse/expand also dissapears. I'm temporarily using a Response.Redirect to the same page, after the save method is completed. But this is a headache since, when I redirect, all the panels load collapsed.

    Any suggestions?

Page 1 of 1 (4 items)
Microsoft Communities