我是个菜鸟,确实还是不好使呢。。。我在gridview外还套个table,因为左右两边是两个框架,是因为table的原因不好使吗,代码在下面,请大师指点~~
<div id="div_list" style="overflow: auto; width: 790px; height: 325px;">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" Font-Size="10pt" Width="1400px" CssClass="tblist" OnRowDataBound="GridView1_RowDataBound" Visible="False" OnPageIndexChanging="GridView1_PageIndexChanging"
PageSize="50" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" OnDataBound="GridView1_DataBound" Style="vertical-align: top;text-align: center; overflow: scroll; border-right: LightSlateGray 1px solid; border-top: LightSlateGray 1px solid;
border-left: LightSlateGray 1px solid; cursor: hand; border-bottom: LightSlateGray 1px solid; background-color: transparent;"
HorizontalAlign="Center" >
<Columns>
<asp:TemplateField HeaderText="选择">
<ItemTemplate>
<asp:CheckBox ID="ChkSelected" runat="server" /></ItemTemplate>
<ItemStyle Height="10px" />
<ControlStyle Height="10px" Width="50px" />
<HeaderStyle Height="10px" Width="50px" />
</asp:TemplateField>
<asp:BoundField HeaderText="ID">
<ItemStyle Height="10px" />
<HeaderStyle Height="10px" />
</asp:BoundField>
</Columns>
<FooterStyle CssClass="page_list" BackColor="#00C0C0" ForeColor="#003399" />
<HeaderStyle CssClass="title" BackColor="White" BorderStyle="Outset" BorderWidth="2px" Font-Bold="True" ForeColor="#CCCCFF" />
<AlternatingRowStyle CssClass="even" />
</asp:GridView>
<FooterStyle CssClass="page_list" BackColor="#00C0C0" ForeColor="#003399" />
<HeaderStyle CssClass="title" BackColor="White" BorderStyle="Outset" BorderWidth="2px" Font-Bold="True" ForeColor="#CCCCFF" />
<AlternatingRowStyle CssClass="even" />
</asp:GridView>
</div>