2

我的aspx页面上有一个网格。我已将其字体属性设置为小..在页面加载时一切正常..但是一旦我执行一些操作,例如网格本身中给出的删除活动..并且网格被绑定再次通过回忆绑定网格的方法..网格似乎更大字体。可能是什么问题?

          <asp:GridView ID="grdSMEList" runat="server" Width="100%" BorderWidth="1px" BorderStyle="Solid"
        Font-Size="Small" AutoGenerateColumns="False" BorderColor="#ffcc00" RowStyle-BorderColor="#ffcc00"
        AllowPaging="true" PageSize="10" OnPageIndexChanging="GrdDynamic_PageIndexChanging"
        DataKeyNames="Resource Personnel No" OnRowCommand="GrdDynamic_RowCommand" RowStyle-BorderStyle="Solid"
        RowStyle-BorderWidth="1px" GridLines="Both" Height="104px">
        <PagerSettings NextPageText="&amp;gt;&amp;gt" PageButtonCount="5" PreviousPageText="&amp;lt;&amp;lt"
            FirstPageText="" LastPageText="" Mode="Numeric" />
        <PagerStyle HorizontalAlign="Right" Font-Size="Medium" />
        <Columns>
            <asp:BoundField DataField="Resource Personnel No" HeaderText="Resource Personnel No" ItemStyle-Width="100px" />
            <asp:BoundField DataField="RES Name" HeaderText="ResourceName" ItemStyle-Width="100px" />

            <asp:TemplateField HeaderText="Deactivate" >
                <ItemTemplate>
                    <div style="text-align:center;">
                        <asp:LinkButton ID="linkDeactivate" CommandName="cmdDeactivate" OnRowCommand="GrdDynamic_RowCommand"
                            CommandArgument='<%# Eval("Resource Personnel No") %>' OnClientClick="return confirm('Are you sure you want to Deactivate?');"
                            runat="server">Deactivate</asp:LinkButton>
                    </div>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="2%" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
4

1 回答 1

0

您是否尝试在 ItemTemplate 中指定字体颜色?值得一试。

于 2012-11-12T21:20:28.223 回答