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; }