473,379 Members | 1,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Freeze the DataGrid Headers

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

Thanks in advance,
Ben!
Nov 18 '05 #1
5 1640
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.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Ben" <bl*********@yahoo.com> wrote in message
news:03****************************@phx.gbl...
Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!

Nov 18 '05 #2
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.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
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.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Ben" <bl*********@yahoo.com> wrote in message
news:03****************************@phx.gbl...
Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!


Nov 18 '05 #3
Ben
Hi,

Thanks for the reply.

Got some questions to clarify:
* How do you make a scrollable DIV element?
* Can't find www.interscapeusa.com

Thanks,
Ben
-----Original Message-----
Hi,

you need to output the datagrid content into scrollable DIV element andagain headers are then "out" of this DIV so that content scrolls but headersstay fixed. You can do it manually grid by grid (grid without headers intoDIV and headers done manually into separate table) or develop a customDataGrid control (with customized rendering) to do the task. Interscape USA(www.interscapeusa.com) has such control for sale and with very low price.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Ben" <bl*********@yahoo.com> wrote in message
news:03****************************@phx.gbl...
Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!

.

Nov 18 '05 #4
You must make the header a separate grid.
This is a limitation of HTML.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Ben" <bl*********@yahoo.com> wrote in message
news:03****************************@phx.gbl...
Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!

Nov 18 '05 #5
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>

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Ben" <bl*********@yahoo.com> wrote in message
news:04****************************@phx.gbl...
Hi,

Thanks for the reply.

Got some questions to clarify:
* How do you make a scrollable DIV element?
* Can't find www.interscapeusa.com

Thanks,
Ben
-----Original Message-----
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.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Ben" <bl*********@yahoo.com> wrote in message
news:03****************************@phx.gbl...
Is there any way to freeze the DataGrid headers so that
the headers are always viewable while srolling down?

Thanks in advance,
Ben!

.

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Billy Jacobs | last post by:
I am using a datagrid to display some data. I need to create 2 header rows for this grid with columns of varying spans. In html it would be the following. <Table> <tr> <td colspan=8>Official...
3
by: sam | last post by:
Hello Group, Havent had luck posting it to microsoft.public.dotnet.framework.aspnet.datagridcontrol group. Excuse me for the cross posting. I have a datagrid which needs to be split into multiple...
2
by: tshad | last post by:
I have a Datagrid that has no rows in it, but I want the title to show, and they aren't. Is there a way to make them visible even if the Datagrid is empty? Thanks, Tom
0
by: kobilov | last post by:
Hi! Some of the columns of my DataGrid should present on the screen all time like row headers. I mean they should be horizontally unscrollable. How can I do this? How can I freeze some of the...
6
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is...
0
by: Jack | last post by:
I am displaying the contents of a dataset to my customer as an excel spreadsheet and giving them the opportunity to save the spreadsheet to their local machine. The spreadsheet has approx 650...
4
by: cooltech77 | last post by:
Hi, I am trying to build the following functionality in the datagrid. I have a lot of columns in the datagrid which are being populated from the database and the user needs to scroll...
3
by: Gidi | last post by:
Hi, I've a dataGrid, and When I click with the mouse on one of it's header the DataGrid_Click event is called. I don't have problem with the event, but strange things happen to the dataGrid...
2
by: Seth Williams | last post by:
Is there a way to mimic the behavior in Excel, for a Gridview, to freeze the column headers/titles, so that they show, as you scroll down the gridview?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.