Problem in freezing header
-
Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.
My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)
-
Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.
My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)
Just use this CSS Class
.HeaderFreez
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}and Set Gridview Header Style to that CSS
For more you can Read This Article[^]
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
-
Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.
My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)
There are a couple of techniques out there for 'shimming' an iframe under the div that contains your header. The iframe should be z-index behind the div and will 'hide' the dropdownlists.