Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Hi
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
Comments
Ankur\m/ at 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
good
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
  Permalink  
Rate this: bad
good
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; 
    text-align:center;
    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
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid