现在的位置: 首页 > 综合 > 正文

一个还不错的gridview 样式

2013年08月01日 ⁄ 综合 ⁄ 共 3432字 ⁄ 字号 评论关闭
  1. <style type="text/css">
  2. <!--
  3. .datable {background-color: #9FD6FF; color:#333333; font-size:12px;}
  4. .datable tr {height:20px;}
  5. .datable .lup {background-color: #C8E1FB;font-size: 12px;color: #014F8A;}
  6. .datable .lup th {border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF;font-weight: normal;}
  7. .datable .lupbai {background-color: #FFFFFF;}
  8. .datable .trnei {background-color: #F2F9FF;}
  9. .datable td {border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF;}
  10. -->
  11. </style>

 

  1. <asp:GridView ID="GridView1" runat="server"  Width="1200px"  CssClass="datable" border="0" CellPadding="2" CellSpacing="1" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False">
  2.                                                                 <RowStyle CssClass="lupbai" />
  3.                                                                 <HeaderStyle CssClass="lup" />
  4.                                                                 <AlternatingRowStyle CssClass="trnei" />
  5.                                                                 <Columns>
  6.                                                                     <asp:BoundField DataField="mac_id" HeaderText="登陆计算机">                                                                
  7.                                                                         <HeaderStyle Width="100px" />
  8.                                                                     </asp:BoundField>
  9.                                                                     <asp:BoundField DataField="u_id" HeaderText="用户代号">
  10.                                                                        <HeaderStyle Width="100px" />
  11.                                                                     </asp:BoundField>
  12.                                                                     <asp:BoundField DataField="op_time" HeaderText="时间" HtmlEncode="False">
  13.                                                                         <HeaderStyle Width="120px" />
  14.                                                                     </asp:BoundField>
  15.                                                                     <asp:BoundField DataField="op_system" HeaderText="字系统名称">
  16.                                                                        <HeaderStyle Width="120px" />
  17.                                                                     </asp:BoundField>
  18.                                                                     <asp:BoundField DataField="op_type" HeaderText="操作类型">
  19.                                                                         <HeaderStyle Width="120px" />
  20.                                                                     </asp:BoundField>
  21.                                                                     <asp:BoundField DataField="op_number" HeaderText="操作数量">
  22.                                                                         <HeaderStyle Width="50px" />
  23.                                                                     </asp:BoundField>
  24.                                                                     <asp:BoundField DataField="op_content" HeaderText="操作内容">
  25.                                                                         <HeaderStyle Width="400px" />
  26.                                                                     </asp:BoundField>
  27.                                                                 </Columns>
  28.                                                             </asp:GridView>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

抱歉!评论已关闭.