How-to: Keep grid header from scrolling off

  • Thread starter Thread starter GaryDean
  • Start date Start date
G

GaryDean

I know this has been mentioned before on these forums but....

Has anyone come up with a good way to keep the heading row of a datagrid
from scrolling out of sight when scrolling a grid in a div? I saw someone
recco rendering the header separately above the div but I recall this had
problems with grid and column widths being aligned.
 
Hi Gary,

I'm not sure whether you have tried following solution from Matt Dotson:

#Matt Dotson's .NET Tips & Tricks : Real World GridView: Excel-like Frozen
Headers for ASP.NET 2.0
http://blogs.msdn.com/mattdotson/archive/2006/03/02/real-world-gridview-exce
l-like-frozen-headers-for-asp-net-2-0.aspx


(You can download the source code here:
http://www.gotdotnet.com/workspaces/releases/viewuploads.aspx?id=1ecb6d2e-a1
04-48f7-a8fb-1622eba20852)


If you haven't, please try it and let me know the result.

If the above code doesn't work for your purpose, would you please depict
more on your actual requirement? Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Gary,

Have you tried above suggestion? Does that work for you?

Please feel free to let me know if there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Walter,
Turns out that this is an I.E. only solution so it won't do in this case.
Looks like I'll have to trump something up.
 
Back
Top