• GridView中几个显示数据时! 数据停靠(靠左 or 居中)的问题!


    1.假如下面有一个Gridview,

     <asp:GridView ID="GVData" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                        BorderStyle="Solid" BorderWidth="1px" OnRowDataBound="GVData_RowDataBound" PageSize="15"
                        Width="100%" CssClass="gridview">
                        <PagerSettings Mode="NumericFirstLast" Visible="False" />
                        <PagerStyle BackColor="LightSteelBlue" HorizontalAlign="Right" />
                        <HeaderStyle BackColor="#006599" Font-Size="12px" ForeColor="White" Height="20px" />
                        <AlternatingRowStyle BackColor="WhiteSmoke" /> 

          <Columns>                      

                           <asp:BoundField DataField="Address" HeaderText="收货地址">
                                  <ItemStyle HorizontalAlign="Left" />                --使包含这个属性的列居左边
                            </asp:BoundField> 

                           <asp:BoundField DataField="ShippingMobile" HeaderText="收货电话" /> --居中

         </Columns>
                        <RowStyle HorizontalAlign="Center" Height="25px" /> --使整个Gridview的行默认居中

     </asp:GridView>

  • 相关阅读:
    bzoj 3930: [CQOI2015]选数
    bzoj 2301: [HAOI2011]Problem b
    HDU 1695 GCD
    2017ACM/ICPC广西邀请赛-重现赛 1007.Duizi and Shunzi
    2017ACM/ICPC广西邀请赛-重现赛 1010.Query on A Tree
    2017ACM/ICPC广西邀请赛-重现赛 1004.Covering
    P3501 [POI2010]ANT-Antisymmetry
    P1171 售货员的难题
    P3385 【模板】负环
    P1659 [国家集训队]拉拉队排练
  • 原文地址:https://www.cnblogs.com/TanYong/p/5101637.html
Copyright © 2020-2023  润新知