可折叠面板延长器问题.. [英] Collapsible Panel Extender Problem..

查看:52
本文介绍了可折叠面板延长器问题..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个要求,我需要在可折叠面板和Gridview中添加客户信息,显示与客户相关的所有记录。



现在的问题是,我的可折叠面板扩展器工作正常,直到Grid打开。每当Grid填充时,可折叠面板都会展开..但是然后不会折叠。



如果我复制代码,那么它正在处理其他应用程序..



可以som1帮我找到相同的确切原因...





代码参考: -





Hi,

I have a requirement where I need to add client information inside a collapsible Panel and a Gridview showing all records related to the clients.

Now the problem is , my collapsible panel extender works fine until the Grid opens. Whenever the Grid is populated, the collapsible Panel expands..but then is not collapsing.

If I copy the code, then its working on other applications..

Can som1 help me to find the exact reason for the same...


Code for reference:--


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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!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 id="Head1" runat="server">
<title>Collapsible Panel Example</title>
<style type="text/css">
.pnlCSS{
font-weight: bold;
cursor: pointer;
border: solid 1px #c0c0c0;
width:30%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div>
<asp:Panel ID="pnlClick" runat="server" CssClass="pnlCSS">
<div style="background-color:Green; height:30px; vertical-align:middle">
<div style="float:left; color:White;padding:5px 5px 0 0">
Collapsible Panel
</div>
<div style="float:right; color:White; padding:5px 5px 0 0">
<asp:Label ID="lblMessage" runat="server" Text="Label"/>
<asp:Image ID="imgArrows" runat="server" />
</div>
<div style="clear:both"></div>
</div>
</asp:Panel>
<div>
<asp:Panel ID="pnlCollapsable" runat="server" Height="0" CssClass="pnlCSS">
<table align="center" width="100%">
<tr>
<td></td>
<td>
<b>Registration Form</b>
</td>
</tr>
<tr>
<td align="right" >
UserName:
</td>
<td>
<asp:TextBox ID="txtuser" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Password:
</td>
<td>
<asp:TextBox ID="txtpwd" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
FirstName:
</td>
<td>
<asp:TextBox ID="txtfname" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
LastName:
</td>
<td>
<asp:TextBox ID="txtlname" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
Email:
</td>
<td>
<asp:TextBox ID="txtEmail" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Phone No:
</td>
<td>
<asp:TextBox ID="txtphone" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Location:
</td>
<td align="left">
<asp:TextBox ID="txtlocation" runat="server"/>
</td>
</tr>
<tr>
<td></td>
<td align="left" >
<asp:Button ID="btnsubmit" runat="server" Text="Save" onclick="btnsubmit_Click1" />
<input type="reset" value="Reset" />
</td>
</tr>
</table>
</asp:Panel>
<asp:CollapsiblePanelExtender

ID="CollapsiblePanelExtender1"

runat="server"

CollapseControlID="pnlClick"

Collapsed="true"

ExpandControlID="pnlClick"

TextLabelID="lblMessage"

CollapsedText="Show"

ExpandedText="Hide"

ImageControlID="imgArrows"

CollapsedImage="~/expand.jpg"

ExpandedImage="~/collapse.jpg"

ExpandDirection="Vertical"

TargetControlID="pnlCollapsable"

ScrollContents="false">
</asp:CollapsiblePanelExtender>
</div>
<div style="position :absolute ; top:350px;">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

        CellPadding="4" ForeColor="#333333">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="ContactName" HeaderText="ContactName"

                SortExpression="ContactName" />
            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
            <asp:BoundField DataField="Country" HeaderText="Country"

                SortExpression="Country" />
            <asp:BoundField DataField="Postal_code" HeaderText="Postal_code"

                SortExpression="Postal_code" />
        </Columns>
        <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#E3EAEB" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:GridView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"

        ConnectionString="<%$ ConnectionStrings:testConnectionString %>"

        SelectCommand="SELECT * FROM [country_new]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>

推荐答案

ConnectionStrings:testConnectionString %>\"

SelectCommand=\"SELECT * FROM [country_new] \"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
ConnectionStrings:testConnectionString %>" SelectCommand="SELECT * FROM [country_new]"></asp:SqlDataSource> </div> </form> </body> </html>


This may cause due to ajaxtoolkit. add reference of Ajax correctly.
This may cause due to ajaxtoolkit. add reference of Ajax correctly.


这篇关于可折叠面板延长器问题..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆