实现DataGrid标题不移出的效果
private void dgr_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Header)
{
e.Item.Style.Add("position","relative;top:expression(document.all['dgr'].offsetParent.scrollTop);");
}
}
{
if(e.Item.ItemType == ListItemType.Header)
{
e.Item.Style.Add("position","relative;top:expression(document.all['dgr'].offsetParent.scrollTop);");
}
}