fixing position of gridview header while scrolling
You can try to separate the header from the content and put the header outside the scrollable content.
<div>Some Page Content </div>
//your heading goes here
<div style="max-height: 400px; overflow: auto;">
//your gridview goes here
</div>
<div>Some Page Content </div>
like this
<div style="float: left; width: 100%;">
<table id="Table1" runat="server" cellpadding="1" border="1" style="background-color: #FFFFFF;
border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
width: 100%;">
<tr style="background-color: #E5E5FE">
<th style="width: 15%;">
Order
</th>
<th style="width: 15%;">
Column Title
</th>
<th style="width: 15%;">
DataType
</th>
</tr>
</table>
</div>
<div style="max-height: 200px; overflow: auto; float: left; width: 100%;">
<asp:GridView ID="GridView2" Style="table-layout: fixed;" Width="100%" AutoGenerateColumns="false"
AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="both" ShowHeader="False">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='Teste'>
</asp:Label>
</ItemTemplate>
<ItemStyle Width="15%" />
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='Teste'>
</asp:Label>
</ItemTemplate>
<ItemStyle Width="15%" />
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='Teste'>
</asp:Label>
</ItemTemplate>
<ItemStyle Width="15%" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
Fixed GridView Header with horizontal and vertical scrolling in asp.net
Refer Here which is 100% working
https://stackoverflow.com/a/59357398/11863405
Static Header for Gridview Control
How to align fixed grid view header with my codes?
Problem solved with reference to:
http://www.dotnetbull.com/2011/11/scrollable-gridview-with-fixed-headers.html
Related Topics
Using Xmlarrayitem Attribute Without Xmlarray on Serializable C# Class
How to Delete Cookies on an ASP.NET Website
Using R.Net.Community in .Net Core 2.0 Preview 1
Openssl.Net Porting a Ruby Example to C# (From Railscasts 143 Paypal-Security)
How to Check That a Uri String Is Valid
Using Simple Injector with Unit of Work & Repository Pattern in Windows Form
Asynchronous Controller Is Blocking Requests in ASP.NET MVC Through Jquery
JavaScript Serialization of Datetime in ASP.NET Is Not Giving a JavaScript Date Object
Where Is Request.Isajaxrequest() in ASP.NET Core MVC
Asp .Net Button - Onclientclick="Return Function()" Vs Onclientclick="Function()"
Soap Authentication Fails When Running a C# App on a Linux Box