The simplest way i follows........ ...
step 1: place the grid view in a DIV tag...
ie: eg: <div id="divdatagrid " style="overflow : scroll; width: 750px; height: 265px">
Step 2 : on load event call the following java script
<script language="JavaS cript" type="text/javascript">
function FreezeGridHeade r()
{
var arRows = document.getEle mentById('ctl00 _WorkArea_gvRFP s').rows;
var oDiv = document.getEle mentById('divda tagrid');
arRows[0].style.position = "relative";
arRows[0].oParentDiv = oDiv;
arRows[0].style.setExpre ssion("posTop", "oParentDiv.scr ollTop-2");
arRows[0].style.zIndex = 30;
}
window.onload=F reezeGridHeader ;
</script>
Here "ctl00_WorkArea _gvRFPs" is the gridview name.
"divdatagri d" is the surrounding div name..
Thanks...
@shraf
S.E.... Cochin
step 1: place the grid view in a DIV tag...
ie: eg: <div id="divdatagrid " style="overflow : scroll; width: 750px; height: 265px">
Step 2 : on load event call the following java script
<script language="JavaS cript" type="text/javascript">
function FreezeGridHeade r()
{
var arRows = document.getEle mentById('ctl00 _WorkArea_gvRFP s').rows;
var oDiv = document.getEle mentById('divda tagrid');
arRows[0].style.position = "relative";
arRows[0].oParentDiv = oDiv;
arRows[0].style.setExpre ssion("posTop", "oParentDiv.scr ollTop-2");
arRows[0].style.zIndex = 30;
}
window.onload=F reezeGridHeader ;
</script>
Here "ctl00_WorkArea _gvRFPs" is the gridview name.
"divdatagri d" is the surrounding div name..
Thanks...
@shraf
S.E.... Cochin
Comment