关于给GridView加滚动条问题
用以下代码DIV加上下和左右滚动条,如是不加固定表头,左右滚动条就OK,如果加固定表头,表头不会包含在左右滚动条里滚动,请问怎样可以加固定表头,并且表头也可以在左右滚动条里滚动.<div style="overflow-y: scroll; overflow-x:scroll; height: 200px; width: 300px">
<!--设置Div带滚动条-->
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3" Width ="400px"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
Font-Size="12px" DataKeyNames="s_po_no" AllowSorting="True">
<FooterStyle BackColor="White" ForeColor="#000066" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="s_po_no" HeaderText="s_po_no" ReadOnly="True" SortExpression="s_po_no" ItemStyle-Width="100px" ItemStyle-Wrap="false" />
<asp:BoundField DataField="s_vendor_id" HeaderText="s_vendor_id" SortExpression="s_vendor_id" ItemStyle-Width="100px" ItemStyle-Wrap="false" />
<asp:BoundField DataField="s_po_date" HeaderText="s_po_date" SortExpression="s_po_date" ItemStyle-Width="100px" ItemStyle-Wrap="false" />
<asp:BoundField DataField="s_qty" HeaderText="s_qty" SortExpression="s_qty" ItemStyle-Width="100px" ItemStyle-Wrap="false" />
</Columns>
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" Wrap=false Width ="400px" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" CssClass="ms-formlabel DataGridFixedHeader"/>
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" CssClass="Freezing" />
</asp:GridView>
<!--调用样式固定表头-->
</div>