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="JavaScript" type="text/javascript">
function FreezeGridHeader()
{
var arRows = document.getElementById('ctl00_WorkArea_gvRFPs').r ows;
var oDiv = document.getElementById('divdatagrid');
arRows[0].style.position = "relative";
arRows[0].oParentDiv = oDiv;
arRows[0].style.setExpression("posTop", "oParentDiv.scrollTop-2");
arRows[0].style.zIndex = 30;
}
window.onload=FreezeGridHeader;
</script>
Here "ctl00_WorkArea_gvRFPs" is the gridview name.
"divdatagrid" is the surrounding div name..
Thanks...
@shraf
S.E.... Cochin