Home > Net >  The gridview freeze header will automatically disappear
The gridview freeze header will automatically disappear

Time:11-20

Gridivew increased after freeze header, while adding a template column checkbox, if too much data in the table will automatically generate a vertical scroll bar, when the scroll bar to pull down the mouse point to the template column either the checkbox, frozen header will disappear automatically, need to pull the scroll bar to the top and then move the mouse to either the checkbox, header to display, please don't disappear, how to solve the header code below,


 


<script type="text/javascript" language="javascript" & gt;
The function CheckAll ()
{
Var gv=document. GetElementById (" gv ");

Var items=gv. GetElementsByTagName (" input ");

For (var I=0; i{
If (the items [I] type=="checkbox")
{
The items [I]. Checked=document. GetElementById (" SelectAll "). Checked;;
}
}
}


</script>

<style type="text/CSS" & gt;

The Freezing
{
position:relative;
Table - layout: fixed;
Top: expression (enclosing the offsetParent. ScrollTop);
Z - index: 10;
}
The Freezing th {text - overflow: ellipsis; Overflow: hidden; White - space: nowrap; Padding: 2 px; }

</style>

<style type="text/CSS" & gt;
HTML, body, form {margin: 0; Height: 100%}
# SelectAll
{
Width: 20 px;
}
</style>

<body>

System functions & amp; gt; & gt; & gt; & gt;


& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; OnClientClick="return ConfirmUpload ()" Style="width: 69 px;"
All Text="upload"/& gt;
& nbsp; & nbsp; & nbsp; & nbsp; Subtotal balance (RMB ten thousand)

To

Product type





AutoGenerateColumns="False"
DataKeyNames="account"
BackColor="White" BorderColor="# 003366" BorderStyle="Double" BorderWidth="1 px"
CellPadding="4" Width="97%" EmptyDataText="no record!"
HorizontalAlign="Center"
The Font and Size="Small" Height="101 px" & gt;
Height="18 pt/& gt;"
<# F7F7DE RowStyle BackColor="" Height=" 15 px "/& gt;
<# EmptyDataRowStyle BackColor="FFFFCC" Height="40 px" HorizontalAlign="Center"
VerticalAlign="Middle"/& gt;



DataFormatString="{0: yyyy/MM/dd}" & gt;








<5 px ItemStyle Height="" Width=" 30 px "/& gt;

DataFormatString="{0: F}" & gt;




No records!

  • Related