Click here to Skip to main content
13,595,908 members
Rate this:
Please Sign up or sign in to vote.
See more:
Iam facing a problem with gridview fixed columns in ie 8 and ie 9 .I found some of the codes where they are working in compatablity modes of ie 8 and 9 .please help me if there is any code which works for gridview fixed columns in both ie 7,8,9 etc.

Thanks in advance
Posted 30-Jan-13 22:54pm
Ankur\m/ 31-Jan-13 5:11am
In such cases, i usually first check for javascript errors. May not be relevant here but at times it's worth a check.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

maybe you can try my solution, i worte a jquery plug-in can be fixed header and freeze column.

It is working on:
Internet Explorer 7, 8 (IE 9 Compatibility)
Internet Explorer 9 (9.0.8112)
Internet Explorer 10 on Windows 7 Preview
Google Chrome(23.0.1271.64 m)
Mozilla Firefox (16.0.2)
Apple Safari (5.1.7)

GridViewScroll with jQuery
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I tried the fixed with CSS and it works on IE 8. Havn't tried it on IE 9 yet.
Apply a CSS class for your Gridview and then add the below into your CSS
.myGridView td 
    padding: 1px; 
    width: 3%;
    font-size: 2em; 
    /*border: solid 1px #525252;
    border-collapse: collapse; */

Guess the width has to be in percentage.
Hopefull that should work.

In cases that you would want to give the columns different widths then you would have to specify the width in the <itemstyle></itemstyle>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180621.3 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100