Reputation: 41
I have grid view which I want to scroll without scrolling header and top border. I have following css solution to scroll gridview without scrolling header row but I am not able to avoid the scrolling of top grid view border.
.HeaderFreez
{
position: relative;
top: expression(this.offsetParent.scrollTop);
z-index: 10;
}
.....
.....
<HeaderStyle CssClass="HeaderFreez" BackColor="Silver" ForeColor="Black" Font-Size="8pt" BorderStyle="Solid" Wrap="False" />
Is there any solution to avoid the scrolling of top border of grid view in aspx ??
Upvotes: 0
Views: 2683
Reputation: 1525
I tried many CSS+Javascript solutions from Git/Google/Web, etc... to use with an ASP.NET Gridview to get fixed THEAD with scrollable TBODY, but the only one that works well is Bootstrap Table. You have to include Bootstrap.
Upvotes: 0
Reputation: 150
You can look in to the following questions
fixing gridview header while scrolling
similar to what you have asked for.
Upvotes: 1
Reputation: 17614
You will have to create a header manually and then put it above the grid. This is the only solution.
Here are some good examples
Similar question on SO
Upvotes: 0