hey every one i have the following code ... when you comment out RounedCornersExtender...the gridview dispears when the page loads
any idea why that is... only happnes in IE ..mozilla works fine :S
<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_Default" Title="Campaigns" %><%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlastoolkit" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <atlas:ScriptManager ID="sm1" runat="server" EnablePartialRendering="True"> </atlas:ScriptManager><%-- <atlastoolkit:RoundedCornersExtender ID="rce" runat="server"> <atlastoolkit:RoundedCornersProperties TargetControlID="GV_CampaignList" Radius="8" Color="#507CD1" /> </atlastoolkit:RoundedCornersExtender>--%> <atlastoolkit:ModalPopupExtender ID="MPE" runat="server"> <atlastoolkit:ModalPopupProperties TargetControlID="insertLnkBtn" PopupControlID="insertPnl" BackgroundCssClass="modalBackground" /> </atlastoolkit:ModalPopupExtender> <div class="MessageHeader"> Campagins </div> <br /> <hr /> <div id="MainContent"> <asp:GridView ID="GV_CampaignList" runat="server" Width="400px" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" DataSourceID="DS_GetAllCampagins" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnSelectedIndexChanging="GridView1_SelectedIndexChanging"> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="C_SiebelID" HeaderText="ID" /> <asp:BoundField DataField="C_Title" HeaderText="Name" SortExpression="C_Title" /> <asp:CommandField ShowEditButton="True" /> <asp:CheckBoxField DataField="C_isActive" HeaderText="Active" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#2461BF" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> <AlternatingRowStyle BackColor="White" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> <br /> <asp:LinkButton ID="insertLnkBtn" runat="Server" OnClientClick="ShowPanel();">Create New Campaign</asp:LinkButton> <script language="javascript" type="text/javascript"> function ShowPanel(){ document.getElementById('ctl00_ContentPlaceHolder1_insertPnl').style.visibility = "visible"; } </script> </div> <br /> <asp:Panel ID="insertPnl" runat="server" CssClass="popupControl"> <asp:DetailsView ID="DetailsView1" runat="server" CssClass="DetailView" AlternatingRowStyle-CssClass="DetailViewEven" HorizontalAlign="Center" GridLines="None" DataSourceID="DS_GetAllCampagins" DefaultMode="Insert"> <Fields> <asp:CommandField ShowInsertButton="True" HeaderText="Create New Campaign" ShowHeader="True" /> </Fields> <AlternatingRowStyle CssClass="DetailViewEven" /> </asp:DetailsView> </asp:Panel> <atlas:UpdateProgress ID="updating" runat="server"> <ProgressTemplate> Updating DataBase<img src="../images/ball2.gif" height="40" width="40" /> </ProgressTemplate> </atlas:UpdateProgress> <asp:SqlDataSource ID="DS_GetAllCampagins" runat="server" CacheDuration="600" ConnectionString="<%$ ConnectionStrings:LocalSqlServer%>" SelectCommand="Campaigns_Admin_GetAll" SelectCommandType="StoredProcedure" SqlCacheDependency="Campaigns" InsertCommand="Campaigns_Admin_Insert" InsertCommandType="StoredProcedure" UpdateCommandType="StoredProcedure"> </asp:SqlDataSource></asp:Content>The GridView disappeared because the RoundedCorners was pointing at it, a TABLE, and the way RoundedCorners works is such that pointing it at a TABLE isn't great. So I added a wrapper Panel and tweaked the settings to get things centered again. The below page works for me in IE7 and FF:
<%@. 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"></script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="sm1" runat="server" EnablePartialRendering="True"> </atlas:ScriptManager> <atlastoolkit:RoundedCornersExtender ID="rce" runat="server"> <atlastoolkit:RoundedCornersProperties TargetControlID="Panel1" Radius="8" Color="#507CD1" /> </atlastoolkit:RoundedCornersExtender> <atlastoolkit:ModalPopupExtender ID="MPE" runat="server"> <atlastoolkit:ModalPopupProperties TargetControlID="insertLnkBtn" PopupControlID="insertPnl" BackgroundCssClass="modalBackground" /> </atlastoolkit:ModalPopupExtender> <div class="MessageHeader"> Campagins </div> <br /> <hr /> <div id="MainContent"> <asp:Panel ID="Panel1" runat="server" Width="400px" HorizontalAlign="Center" BackColor="lightblue" style="margin-left:auto;margin-right:auto;"> <asp:GridView ID="GV_CampaignList" runat="server" Width="400px" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" DataSourceID="DS_GetAllCampagins" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" > <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="C_SiebelID" HeaderText="ID" /> <asp:BoundField DataField="C_Title" HeaderText="Name" SortExpression="C_Title" /> <asp:CommandField ShowEditButton="True" /> <asp:CheckBoxField DataField="C_isActive" HeaderText="Active" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#2461BF" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> <AlternatingRowStyle BackColor="White" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </asp:Panel> <br /> <asp:LinkButton ID="insertLnkBtn" runat="Server" OnClientClick="ShowPanel();">Create New Campaign</asp:LinkButton> <script language="javascript" type="text/javascript"> function ShowPanel(){ document.getElementById('ctl00_ContentPlaceHolder1_insertPnl').style.visibility = "visible"; } </script> </div> <br /> <asp:Panel ID="insertPnl" runat="server" CssClass="popupControl"> <asp:DetailsView ID="DetailsView1" runat="server" CssClass="DetailView" AlternatingRowStyle-CssClass="DetailViewEven" HorizontalAlign="Center" GridLines="None" DataSourceID="DS_GetAllCampagins" DefaultMode="Insert"> <Fields> <asp:CommandField ShowInsertButton="True" HeaderText="Create New Campaign" ShowHeader="True" /> </Fields> <AlternatingRowStyle CssClass="DetailViewEven" /> </asp:DetailsView> </asp:Panel> <atlas:UpdateProgress ID="updating" runat="server"> <ProgressTemplate> Updating DataBase<img src="../images/ball2.gif" height="40" width="40" /> </ProgressTemplate> </atlas:UpdateProgress> <asp:XmlDataSource ID="DS_GetAllCampagins" runat="server"> <Data> <root> <item C_SiebelID="a" C_Title="b" C_isActive="false" /> </root> </Data> </asp:XmlDataSource> </div> </form></body></html>
Thank you very much
0 件のコメント:
コメントを投稿