zoukankan      html  css  js  c++  java
  • 如何给GridView添加滚动条 收藏

    第一种方法

    代码
    <div style="overflow-y: scroll; height: 200px">
    <asp:GridView ID="GridView1" runat="server" Font-Size="12px" BackColor="#FFFFFF"
    GridLines
    ="Both" CellPadding="4" Width="560">
    <HeaderStyle BackColor="#EDEDED" Height="26px" />
    </asp:GridView>
    </div>


    第二种方法

    将Gridview放到一个div里面,设置div的style= "overflow:   auto; "
    再加CSS (样式表) 

    代码
    .DataGridFixedHeader
    {
    POSITION
    : relative ;
    TOP
    : expression(this.offsetParent.scrollTop);
    BACKGROUND-COLOR
    : blue ;
    height
    :25px;
    color
    :#ffffff;
    text-align
    :center ;
    vertical-align
    :middle;
    font-weight
    :bold;
    font-size
    :13px;
    background-color
    :#5D7B9D;
    }


    设置Gridview的   HeaderStyle的CSSClass= "DataGridFixedHeader "

    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/wangjrong/archive/2009/09/15/4553563.aspx

  • 相关阅读:
    2.7 矩阵的秩
    HDU
    HDU
    HDU
    HDU
    HDU
    hdu 5179 beautiful number(数位dp)
    ACdream
    CodeForces
    <a>标签中 href="/" 和 hideFocus="true"
  • 原文地址:https://www.cnblogs.com/RascallySnake/p/1925498.html
Copyright © 2011-2022 走看看