473,545 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1648
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*********@ya hoo.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****@aspalli ance.com> wrote in message
news:uy******** ******@TK2MSFTN GP10.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*********@ya hoo.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*********@ya hoo.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*********@ya hoo.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.c om 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:1 80px">
....content goes here
</DIV>

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

"Ben" <bl*********@ya hoo.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*********@ya hoo.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
7668
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 Impact Summary</td> </tr> <tr> <td colspan=2></td>
3
539
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 pages when printing along with headers on every page. I came up with this routine below which adds 2 rows - one with datagrid headers and the...
2
1776
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
1059
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 columns? Thanks
6
2737
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 freeze.
0
1299
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 rows and 75 columns. The following code works fine (without the two lines following the response.end), as far as generating the spreadsheet, but I...
4
3099
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 horizontally to view these coloumn names. So I want to group them into categories which will fit into a page. A user clicks a category and the category...
3
1459
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 after I click on one of the headers. I have DataSet that bounded to this DataGrid so i could write into the dataGrid, but when i click on the headers...
2
3364
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?
0
7486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7676
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7932
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7776
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4965
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1905
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
729
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.