Wrox Programmer Forums
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 28th, 2008, 12:31 AM
Registered User
Join Date: Sep 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rsanuj
Default how to freeze(fix) datagrid header

In .net 1.1, I want to fix(freeze) datagrid header, which is scrollable through div tag. How can I fix header of datagrid.

Old August 28th, 2008, 11:04 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

I did this by assigning a style class to the grid header which renders as a table row. The style rule looks like this:

    position: relative;
    top: expression(this.offsetParent.scrollTop);

However, I did this for an application targeted at I.E. I don't know if "expression" works in other browsers.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid fix Header row PramodPatil ADO.NET 3 October 27th, 2007 12:39 AM
Freeze DataGrid header gerardocarroll ASP.NET 2.0 Basics 0 April 3rd, 2007 12:56 PM
freeze columns in datagrid Kris DExelle Pro VB 6 1 September 27th, 2006 07:48 AM
How to freeze the columns in windows DataGrid? pradpb999 ADO.NET 0 July 31st, 2006 06:19 AM
How to freeze the header row shankhan Classic ASP Databases 1 April 23rd, 2005 02:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.