Has GridView control improved in VS 2008 especially for freezing column headers?

I am struggling getting my Gridview in ASP.NET 2.0 Visual Studio 2005 to freeze the column header row and provide for scrolling of the remaining data rows. My specific problems right now are:

  • (IE7) column headers freeze and do not scroll  BUT scroll bar is not initially visible to user (requires scrolling with mouse wheel before scroll bars are exposed in gridview)
  • (Firefox 2.0.10) column header row just scrolls out of sight like any other row 

Does anyone know if ASP.NET 3.5 and VStudio 2008 offer any improvements in this specific area of GridView behavior ?


John
0
jjamjatra
5/14/2008 4:19:43 PM
asp.net.visual-studio-2008 3408 articles. 0 followers. Follow

3 Replies
540 Views

Similar Articles

[PageSpeed] 13

Hi jjamjatra,

Based on my knowledge there is no improvement in this area of Visual Studio 2008.

Here is a sample for fixing header by CSS style:

<style type="text/css"> 
.Freezing 
{     
      position
:relative ; 
       table-layout
:fixed;
       top
:expression(this.offsetParent.scrollTop);   
       z-index
: 10;
}
 
.Freezing th
{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:2px;}
</style>

<div style="overflow-y: scroll; height: 200px; width: 300px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
 BackColor
="White" BorderStyle="None" BorderWidth="1px" Font-Size="12px" DataKeyNames="ProductID" DataSourceID="SqlDataSource1" AllowSorting="True">
<Columns>
   
<asp:CommandField ShowSelectButton="True" />
    
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
    
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
    
<asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" />
    
<asp:BoundField DataField="Gender" HeaderText="Gneder" SortExpression="Gender" />
</Columns>
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" CssClass="Freezing" /></asp:GridView>
</div>

Thanks,


Qin Dian Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Qin
5/19/2008 9:33:25 AM

 Hi - thanks for responding. This looks a lot like what I have already tried - will look more closely when I get to the office and try it out...

Do you know if this CSS approach works for browsers other than IE7 - especially Firefox ? 

 


John
0
jjamjatra
5/19/2008 12:38:35 PM

Hi jjamjatra,

As you know fixing header in different browsers is a tough job. It is hard to say it works perfect or it does not work. I know many problems have been rectified in IE7 for freezing header, but I cannot promise they are also resolved in other browsers, because they are not the products of Microsoft and have many versions (usually some versions are resolved, but others not).

Here are other two articles for fixed header:

http://blogs.msdn.com/mattdotson/archive/2006/03/02/real-world-gridview-excel-like-frozen-headers-for-asp-net-2-0.aspx

http://www.pmob.co.uk/temp/fixedlayoutexample5.htm

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Thanks,


Qin Dian Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Qin
5/20/2008 2:34:59 AM
Reply:

Similar Artilces:

Visual Studio 2008 includes SQL Server 2008 Express and Visual Basic 2008?
Please can somebody tell me whether Visual Studio 2008 includes SQL Server 2008 Express or 2005? Also does it include Visual Basic 2008 or 2005? Thank you.VWGolfman  VS2008 installs Sql Server 2005 Express by default. Also, VS2008 installs the new version of VB.Net BUT you can target older runtimes (i.e .Net 1.1, .Net 2, .Net 3) so you can argue that all VB.Net versions are "installed". Thank you Steven VWGolfman...

Visual Studio 2005 vs Visual Studio 2008
I have 2 systems. One running XP Pro SP2 + updates second Vista + Updates (and SP1 when its released) I have a copy of Visual Studio 2005 and Visual Studio 2008. Should i use Visual Studio 2008 on both systems as it allows me to target different .Net platforms? or should i use XP with VS 2005 and Vista with VS 2008. My aim is to create projects for different platforms but still have the advantages of a new product and features i.e. WPF, AJAX, intellisense etc. Is there a reason why someone would want to have VS2005 running on XP rather than VS 2008. Im under the impression VS 20...

Visual Studio 2008 +Visual Basic 2008
Hello, I am wondering if I can use Visual Studio 2008 pro to create a project in Visual Basic 2008 for PDAs...? Should it have an option to create a PDA's projects?   Yes, you can create one under New Project --> Visual basic --> Smart Device Project.  Good Luck....

Visual Studio 2005 vs Visual Studio 2008 #2
Are there any known issues with decimal rounding in VS 2008.  I have developed a timesheet app that calculates hours based on start and stop times.  It works fine when I use debugger in VS 2005 and a local host.  My boss uses VS 2008 to publish my app.  When he publishes it, my calculations are not rounding properly.  Example:  Someone clocks in at 11:30pm and clocks out at 11:59pm,  in debug mode on my localhost, it rounds it to .5 hours.  When this code gets published, it rounds it to 0 hours.  Thanks  Considering that both the VS 2005...

What is the difference between Visual studio.net and Visual studio 2008 express?
 I am fairly new in ASP.net development, i have downloaded sql express and visual studio express on the microsoft site, but i was just wondering if there is a huge difference between the express packages and the actual profesional packages. Any ideas on that?www.buggrep.comBest error repository site on the web!! If you are new then dont worry about it it, visual web developer express and sql server express are both fine for developing with all the major features of asp.net / sql server.There are some advanced features that I dont even know what they are.I think that the older sql expr...

VS.NET 2005 V/s VWD 2008 & VS.NET 2008
Hi, I just download Visual Web Developer 2008 and little use it. Can anyone inform me what is the major difference b/w VS.NET 2005 V/s VWD 2008, I am asking only on the ASP.NET point of view. Can some one also guide me If I use Visual Studio 2008 so what major extra benefit I can take as compare to using VWD 2008. Please give me some practical example. Thanks in advance. Difference VS 2005 Target Framework 2.0 AJAX - To be installed separately by installing AJAX Extensions JavaScript Intellisense -limited JavaScript debugging - limited VWD 2008 Target Framework 2.0-3.5 ...

Difference between visual studio 2008 development edition and visual studio 2008 team edition?
i see some menus changed but what is the actual difference The following link has the VS product Comparison chart: http://www.microsoft.com/downloads/details.aspx?FamilyID=727bcfb0-b575-47ab-9fd8-4ee067bb3a37&DisplayLang=en In short, Team Suite has tools that are in the Architectute, Database, and Test editions that the Development edition does not have....

How to Freeze the Header of Visual Studio Gridview control
Visual Studio 2005, vb Hi,  I have a web form with gridview control added and would like to know how can I freeze the header row. Thanksptown http://www.codeguru.com/columns/vb/article.php/c14209 Thank you, I will let you know how things turn out.ptown...

Visual Studio 2008 and Business Intelligence Development Studio 2008
I'm having a difficult time getting BIDS2008 to run in VS2008.  I have a "messy" system, because a reformat isn't an option currently.OS: XP (current patch and SP)Installed: VS2005, VS2008, MS SQL2008 (FULL product, all options selected) (all patched and current sp respectively)Had:  MS SQL2005, SQL2005 Mgt Studio Express and SQL2008 Express (All officially uninstalled via add/remove, prior to install of SQL2008) Issue:  I click on "SQL Server Business Intelligence Development Studio" link in Microsoft SQL Server 2008 MyPrograms tab and get my VS200...

A compatible version of Visual Studio 2008 was not detected on the system. This update is designed for only the Microsoft Visual Studio 2008 (ENU) product family, and is not compatible with any Expres
 Hello,          I'm trying to install VS2008 SP1 on Vista Ultimate but I receive this error "A compatible version of Visual Studio 2008 was not detected on the system. This update is designed for only the Microsoft Visual Studio 2008 (ENU) product family, and is not compatible with any Express editions." Either I download the installer from here (http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en) or after downloading the ISO from here (http://www.microsoft.com/downloads/details.aspx?Fa...

Visual Studio .NET vs Visual Studio .NET 2002 or 2003?
As an admin, I'm working to determing what systems I need to update with the update on MS08-017, particularly with respect to Visual Studio .NET 2002 and 2003. I've got quite a few systems that appear to have Visual Studio .NET, no 2002 or 2003 mentioned when I view what's there in Add/Remove Programs. Is there a definitive way to determine if I have a 2002 or 2003 version?   sandy_wood:Is there a definitive way to determine if I have a 2002 or 2003 version? In add/remove programs it would indicate it VS2003 as Visual Studio 2003. Alternatively launch the applicatio...

How can acheive includes on the menus, header and footers in .net csharp in visual studio 2008?
Hello people, I am developing web application using  csharp in visual studio 2008.I have done a website template. I would like to use include.   when developing the application. Mean I would like to have  header on one page, then menu on one page and footer on a differentpage. Then these pages should just be included or called on the pages where I want to use them. How can I achieve this or do it? That's what the masterpage was designed to do.  Include content on every page. #14 | [How Do I:] Create a Master Page in Visual Studio 2008 8 minutes, 20 sec...

Windows Server 2008, Microsoft SQL Server 2008 and Microsoft Visual Studio 2008 Launched!
Largest enterprise launch in company history includes Windows Server 2008, Microsoft SQL Server 2008 and Microsoft Visual Studio 2008; focuses on security, Web, virtualization and better business intelligence. LOS ANGELES - Feb. 27, 2008 - Kicking off more than 225 events around the world and joined by more than 4,000 customers and partners, Microsoft Corp.'s Chief Executive Officer Steve Ballmer today showcased the next generation of infrastructure and application platform products, including Windows Server 2008, Microsoft Visual Studio 2008 and Microsoft SQL Server 2008....

VS 2008 Installation Error: Microsoft Visual Studio 2008 Professional Edition
 Hi,I have HP laptop. Some time back on my laptop VS.Net was working fine. But due to some issues I restore my system and after that I am unable to install VS.Net. When i am trying to install VS.Net 2008 , I am getting "Microsoft Visual Studio 2008 Professional Edition - ENU has encountered a problem during setup.  Setup did not complete correctly."  error. Detail error log is [04/10/09,21:59:05] Microsoft .NET Framework 3.5: [2] Error code 1603 for this component means "Fatal error during installation."[04/10/09,21:59:05] Microsoft .NET Framewor...

Web resources about - Has GridView control improved in VS 2008 especially for freezing column headers? - asp.net.visual-studio-2008

Trump wants GOP shows him respect
USA TODAY Trump wants GOP shows him respect USA TODAY Republican presidential candidate Donald Trump speaks during a rally aboard the aircraft ...

Federal authorities set to indict friend who bought guns for San Bernardino ...
Fox News Federal authorities set to indict friend who bought guns for San Bernardino ... Fox News Federal authorities are expected to bring ...

Lie-detecting software uses real court case data
By studying videos from high-stakes court cases, University of Michigan researchers are building unique lie-detecting software based on real-world ...

Yahoo's Mayer: From grocery store to Silicon Valley star
She is one of the biggest stars in Silicon Valley, but multimillionaire chief executive Marissa Mayer has her hands full trying to revive the ...

1 After Another, Chicago Police Videos Made Public
Under a national spotlight, Chicago releases video after video showing police encounters

'Straight Outta Compton' Director F. Gary Gray Reacts to SAG Award Nomination
Actors Ice Cube , O’Shea Jackson Jr , and director F. Gary Gray pose together at the Straight Outta Compton Celebration Lunch held at Chevalier ...

Alexander Skarsgard Unleashes His Wild Side in First Trailer for ‘The Legend of Tarzan’ – WATCH
The first trailer for the upcoming film The Legend of Tarzan has been released and teases glimpses of star Alexander Skarsgard’s muscled body ...

Uber riders jam to the Chainsmokers with world's coolest driver
Uber driver Jonathan likes to keep his rides interesting. So he invites his passengers to jam out to his favorite Chainsmokers song, "Roses." ...

Can The Toxicity Of Ted Cruz Actually Be Trumpf's GOP Insurance Policy?
At Trumpf's bund rally in South Carolina a few days ago, he Islamophobic remarks got most of the news. But did you miss that he also seems to ...

YouTube Rewind 2015 celebrates the year’s top videos
The year's almost over, and that means it is time for YouTube's year in review. YouTube is home to content covering all aspects of the year — ...

Resources last updated: 12/10/2015 9:52:26 AM