Manak Ram Seervi
Manak Ram Seervi

Reputation: 41

ASP Grid View Scroll With Header and Top Border Fixed

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

Answers (3)

Matt Roy
Matt Roy

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

Rao
Rao

Reputation: 150

You can look in to the following questions

fixing gridview header while scrolling

Grid view fixed header

similar to what you have asked for.

Upvotes: 1

Related Questions