User288213138 posted
Hi Gopi.MCA,
<asp:GridView ID="grdPDFView"
In the html page, the browser does not render asp tags.
So if you want to fix Gridview Header, I suggest you can do it in the web form.
You can try to use ScrollableGridView plugin.
The code:
<script src="ScrollableGridPlugin_ASP.NetAJAX_2.0.js"></script>
<script>
$(document).ready(function () {
$('#<%=GridView1.ClientID %>').Scrollable({
ScrollHeight: 300,
Width: 467
});
});
</script>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="CustomerId">
<ItemTemplate>
<%# Eval("CustomerId") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<%# Eval("Name") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Country">
<ItemTemplate>
<%# Eval("Country") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
The result:

If you don't want to use plug, you can use javascript to fix the Gridview header.
Dynamically freeze ASP.Net Gridview header using JavaScript
If you want to construct a Gridview in an HTML page and fix its header, you can refer to this link:
https://forums.asp.net/t/2154515.aspx
Best regards,
Sam