Thank you very much for helping me. Yes, the gridview is a normal gridview and the scrolling was not a big deal before but I've been asked to get this fix. When you click on each of the gridview headers the records are sort by the header clicked, and it works fine if you are at the top of the gridview, but if you scroll down a little bit, the headers are still there but if you click on one of them to sort the records by that column, they get sorted but the headers dissapear completly from the gridview. Here's some code:
<asp:Panel ID="Panel1" runat="server" ScrollBars="Vertical" Height="100%" Width="100%">
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="CPGridView" runat="server" AutoGenerateColumns="False" CellSpacing="1" CellPadding="2" Width="98%" CssClass="MyGrid2" GridLines="None" AllowSorting="true" >
<FooterStyle cssclass="MyGridFooter"/>
<Columns>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:LinkButton ID="btnRemove" runat="server" CommandName="Delete" OnClientClick="return confirm('Are you sure you want to remove control plan link?');" style="color:blue;" Text="Remove" />
</ItemTemplate>
<FooterStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="SysInspPlanID" HeaderText="Sys Insp Plan ID" ReadOnly="True">
<FooterStyle CssClass="hiddencol" />
<HeaderStyle CssClass="hiddencol" />
<ItemStyle CssClass="hiddencol" />
</asp:BoundField>
<asp:BoundField DataField="ProductArchSysId" HeaderText="PG ARCH SYS ID" ReadOnly="True">
<FooterStyle CssClass="hiddencol" />
<HeaderStyle CssClass="hiddencol" />
<ItemStyle CssClass="hiddencol" />
</asp:BoundField>
<asp:BoundField DataField="ProductGroupID" HeaderText="Product Group ID" ReadOnly="True" SortExpression="ProductGroupID" />
<asp:BoundField DataField="ProductGroupName" HeaderText="Name" ReadOnly="True" SortExpression="ProductGroupName" />
<asp:BoundField DataField="ProductGroupRevision" HeaderText="IQS Revision" ReadOnly="True" SortExpression="ProductGroupRevision" />
<asp:BoundField DataField="ProductGroupArchTimeStamp" HeaderText="IQS Revision Date" ReadOnly="True" SortExpression="ProductGroupArchTimeStamp" />
<asp:TemplateField HeaderText="Activity" SortExpression="InspPendingStatus">
<ItemTemplate>
<asp:Label ID="InspPendingStatus" runat="server" Text='<%#Eval("InspPendingStatus")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="IsDeleteOK" runat="server" Text='<%#Eval("IsDeleteOK")%>' />
</ItemTemplate>
<FooterStyle CssClass="hiddencol" />
<HeaderStyle CssClass="hiddencol" />
<ItemStyle CssClass="hiddencol" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="MyGridRow" />
<HeaderStyle CssClass="MyGridHeader" />
<AlternatingRowStyle CssClass="MyGridAltRow" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
.MyGrid2
{font-weight: bold;
font-family:Arial;
font-Size: 0.85em;
color:Black;}
.MyGridHeader
{position: relative;
background-color: #1C5E55;
Color: White;
font-family: Verdana;
font-Size: 1.0em;
top:expression(parentNode.scrollTop-2);
z-index:99;}
.MyGridFooter
{background-color: #1C5E55;}
.MyGridRow
{background-color: #E3EAEB;}
.MyGridAltRow
{background-color: White;}
.hiddencol
{display: none;
width: 0%;}