Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixed GridView Header with horizontal and vertical scrolling in asp.net

I want to fix(Freeze) gridview header while vertical scrolling.

I also want to fix first column while horizontal scrolling.

I want this in both chrome and IE.

like image 754
Vivek Parikh Avatar asked Oct 02 '11 09:10

Vivek Parikh


2 Answers

It is possible to apply the specific GridView / Table layout via custom CSS rules (as it was discussed in the <table><tbody> scrollable? thread) to fix GridView's Header. However, this approach will not work in all browsers. The 3-rd ASP.NET GridView controls (such as the ASPxGridView from DevExpress component vendor provide this functionality.

Check also the following CodeProject solutions:

  • Fixed header Grid

  • Gridview with fixed header

  • Gridview Fixed Header

like image 198
Mikhail Avatar answered Nov 15 '22 07:11

Mikhail


I was looking for a solution for this for a long time and found most of the answers are not working or not suitable for my situation i also find most of the java script code for that they worked but only with the vertical scroll not with the horizontal scroll and also combination of header and rows doesn't match.

Finally i have found a solution with javascript here is the link bellow :-

scrollable horizontal and vertical grid view with fixed headers

like image 39
Vivek Avatar answered Nov 15 '22 07:11

Vivek