<div style="BORDER:0px;PADDING:0px;MARGIN:0px;OVERFLOW:auto;WIDTH:736px;HEIGHT:200px">
              <asp:DataGrid id="DataGrid1" width="720px" CellPadding="2" CellSpacing="1"
              BorderColor="#cc9966" Font-Size="9pt" AlternatingItemStyle-BackColor="#6699ff"
              runat="server" ShowHeader="False" AutoGenerateColumns="False">
                <Columns>
                  <asp:BoundColumn DataField="Title">
                    <ItemStyle Width="360px"></ItemStyle>
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="CreateDate">
                    <ItemStyle Width="180px" HorizontalAlign="Center"></ItemStyle>
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="pid">
                    <ItemStyle Width="140px" HorizontalAlign="Center"></ItemStyle>
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="HitCount">
                    <ItemStyle Width="40px" HorizontalAlign="Center"></ItemStyle>
                  </asp:BoundColumn>
                </Columns>
              </asp:DataGrid>
            </div>
div 的width及其height可以调整

解决方案 »

  1.   

    <div style="OVERFLOW:auto;HEIGHT:100%;width=100%">
    </div>
      

  2.   

    div 不能是 height:100%; width:100% 的, 否则出不了滚动条, 它 100% 是相对内容的.
      

  3.   

    http://www.dnzone.com/ShowDetail.asp?NewsId=564
      

  4.   

    对头,把DataGrid 放在一个<DIV>里面,设置Div 的样式OVERFLOW:auto;这样就可以解决了
      

  5.   

    放到层里面,定义层的大小为需要的大小
    不许DataGrid分页一定可以的