How-to: Keep grid header from scrolling off

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.
 
W

Walter Wang [MSFT]

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.
 
W

Walter Wang [MSFT]

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.
 
G

GaryDean

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top