Chrome和Mozilla中的gridview分页对齐问题

时间:2014-04-03 13:50:12

标签: asp.net google-chrome gridview cross-browser

我有一个带分页的gridview控件。在IE中,一切都很好。 但在Firefox和Chrome中,设计因分页而中断。

我在这里附上IE和Firefox的截图:

在IE中:

View in IE

在Firefox中:

View in Firefox

这是我的网格视图:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderWidth="0"
        AllowPaging="true" ShowFooter="true" PageSize="3" Width="100%" OnPageIndexChanging="GridView1_PageIndexChanging"
        OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
        OnRowUpdating="GridView1_RowUpdating"
        OnRowDeleting="GridView1_RowDeleting" OnRowCommand="GridView1_RowCommand" HorizontalAlign="Center">
        <AlternatingRowStyle CssClass="gridAlternateRow" />
        <FooterStyle CssClass="gridFooter" />
        <PagerSettings Mode="NumericFirstLast" />
        <PagerStyle HorizontalAlign="Center" CssClass="GridPager" VerticalAlign="Middle" Wrap="False" />
        <HeaderStyle CssClass="GridHeader" />
        <RowStyle CssClass="gridRow" />
        <Columns>
            <asp:TemplateField HeaderText="ID" Visible="false">
                <ItemTemplate>
                    <asp:Label ID="lblID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lbladd" runat="server"></asp:Label>
                </FooterTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="From Date" HeaderStyle-Width="10%">
                <ItemTemplate>
                    <asp:Label ID="lblFromDate" runat="server" Text='<%#Eval("FromDate") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox CssClass="myCalCss" ID="txtFromDate" runat="server" Text='<%#Eval("FromDate") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox CssClass="myCalCss" ID="txtAddFromDate" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqFromDate" ValidationGroup="ValgrpConUNIAnesthesiaFeeSchedule" ControlToValidate="txtAddFromDate" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                </FooterTemplate>
                <HeaderStyle Width="15%"></HeaderStyle>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="To Date" HeaderStyle-Width="15%">
                <ItemTemplate>
                    <asp:Label ID="lblToDate" runat="server" Text='<%#Eval("ToDate") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox CssClass="myCalCss" ID="txtToDate" runat="server" Text='<%#Eval("ToDate") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox CssClass="myCalCss" ID="txtAddToDate" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqToDate" ValidationGroup="ValgrpConUNIAnesthesiaFeeSchedule" ControlToValidate="txtAddToDate" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                </FooterTemplate>
                <HeaderStyle Width="15%"></HeaderStyle>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Procedure Code" HeaderStyle-Width="15%">
                <ItemTemplate>
                    <asp:Label ID="lblProcedureCode" runat="server" Text='<%#Eval("ProcedureCode") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtProcedureCode" runat="server" Text='<%#Eval("ProcedureCode") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtAddProcedureCode" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqProcedureCode" ValidationGroup="ValgrpConUNIAnesthesiaFeeSchedule" ControlToValidate="txtAddProcedureCode" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                </FooterTemplate>
                <HeaderStyle Width="15%"></HeaderStyle>
            </asp:TemplateField>


            <asp:TemplateField HeaderStyle-Width="15%">
                <ItemTemplate>
                    <span onclick="return confirm('Are you sure want to delete?')">
                        <asp:LinkButton CssClass="aDelete" ID="btnDelete" Text="Delete" runat="server" CommandName="Delete" />
                    </span>
                    <asp:LinkButton ID="btnEdit" Text="Edit" runat="server" CommandName="Edit" CssClass="aEdit" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:LinkButton ID="btnUpdate" Text="Update" runat="server" CommandName="Update" CssClass="aUpdate" />
                    <asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CssClass="aSave" />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Button ID="btnInsertRecord" runat="server" Text="Add" ValidationGroup="ValgrpConUNIAnesthesiaFeeSchedule" CommandName="Insert" />
                </FooterTemplate>
                <HeaderStyle Width="15%"></HeaderStyle>
            </asp:TemplateField>
        </Columns>            
    </asp:GridView>

我看一下Firebug,这是我在IE和Firefox中得到的。相同的HTML。

Firebug Screenshot

我错过了什么?

0 个答案:

没有答案