Print Page | Close Window

"immovable" Datagrid Header

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5455
Printed Date: 28 March 2026 at 2:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: "immovable" Datagrid Header
Posted By: pnp!
Subject: "immovable" Datagrid Header
Date Posted: 02 September 2003 at 1:45pm


I want to have a datagrid with a "fixed" header.
What I mean is that you can scroll the content of the datagrid but the header remains in the same
position so as you can see the content and get a reference of what's that colum, seeing the header.

Do someone know how can I do that?

Thanks in advance!.

Pablo Pecora
Banco Itaś - Argentina




Replies:
Posted By: Diep-Vriezer
Date Posted: 02 September 2003 at 2:18pm
Sure, just create a < table > header and footer and place the datagrid inside.

-------------
Gone..


Posted By: Diep-Vriezer
Date Posted: 02 September 2003 at 2:21pm

something like

 < table >
   < tr >
     < td > This is a fixed header field < /td >
     < td > This is also a fixed header field < /td >
   < /tr >
   < tr >
     < td > This is the datagrid row, without the code < /td >
     < td > This is also a datagrid row, without the code < /td >
   < /tr >
 < table >

Of course, do NOT use the spaces in the HTML statements, but since the browser might parse it, I haven't done it.



-------------
Gone..


Posted By: pnp!
Date Posted: 02 September 2003 at 2:27pm
Originally posted by Diep-Vriezer Diep-Vriezer wrote:

something like

 < table >
   < tr >
     < td > This is a fixed header field < /td >
     < td > This is also a fixed header field < /td >
   < /tr >
   < tr >
     < td > This is the datagrid row, without the code < /td >
     < td > This is also a datagrid row, without the code < /td >
   < /tr >
 < table >

Of course, do NOT use the spaces in the HTML statements, but since the browser might parse it, I haven't done it.

I guess you didn't understood me...

When I said 'fixed' ... i referr to a header that remains in the same position despite of scrolling...

You keep on scrolling and the header remains there!



Posted By: karp13
Date Posted: 02 September 2003 at 2:29pm

If you do a search in the forums at  http://www.asp.net - http://www.asp.net  this topic has been discused many times and there are some solutions posted.



Posted By: Diep-Vriezer
Date Posted: 03 September 2003 at 2:28pm
Thats easy too, just create a iframe or something. It does req. a page per col.

-------------
Gone..



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net