Freeze the DataGrid Headers

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!
 
Hi,

you need to output the datagrid content into scrollable DIV element and
again headers are then "out" of this DIV so that content scrolls but headers
stay fixed. You can do it manually grid by grid (grid without headers into
DIV and headers done manually into separate table) or develop a custom
DataGrid control (with customized rendering) to do the task. Interscape USA
(www.interscapeusa.com) has such control for sale and with very low price.
 
look up this topic on aspnetpro website. dino esposito has written two
articles, one in october, and one in december explaining how to do this.
 
You must make the header a separate grid.
This is a limitation of HTML.
 
Hi,

sorry for delay. interscapeusa.com was down for some time (Interscape is a
company owned by Robert McLaws, one of my fellow MVPs)

Scrollable DIV is a DIV with overflow, overflow-x or overflow-y style
attributes, for example

<DIV style="overflow-y:auto;height:180px">
....content goes here
</DIV>
 
Back
Top