1.首先在页面中划出一个带有滚动条的区域:
<DIV style="OVERFLOW:auto; WIDTH:54.55%; HEIGHT:136px; TEXT-ALIGN:left">
</DIV>
2.将datagrid添加到区域之中并引用css固定标题:
<HEAD>
......
<link rel="stylesheet" href="StyleSheet1.css" type="text/css">
</HEAD>
<body〉
<DIV style="OVERFLOW:auto; WIDTH:54.55%; HEIGHT:136px; TEXT-ALIGN:left">
<asp:datagrid id="DataGrid1" runat="server" AllowSorting="True" Height="96px" GridLines="Vertical"
CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#999999"
Width="592px" ShowHeader="true">
<SelectedItemStyle Font-Bold="True" Wrap="False" ForeColor="