zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    动态规划解决数字三角形问题
    动态规划,贪心,分治
    7-3 两个有序序列的中位数 (20分) log n的解法
    二分查找 单峰数组中的最大值 O(log n)
    数据库连接池 C3P0和 Druid
    SQL注入问题
    MATLAB spectrogram命令
    JDBC工具类
    Egret--拼接Rect实现用于新手引导的扣洞
    egrte-取消居中约束
  • 原文地址:https://www.cnblogs.com/TanYong/p/5101637.html
Copyright © 2011-2022 走看看