Click here to Skip to main content
12,353,366 members (70,397 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# CSS sharepoint2010
Hi everybody,
Is it possible to freeze a few columns of a gridview using only CSS. If yes, please help me with the way to do it. FYI, I have added the columns programatically using c# and the grid contains bound fields as well as template fields. This grid is implemented in sharepoint 2010. Please reply asap.

Thanks & Regards,
Srivikas.
Posted 15-Nov-12 0:05am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

div#topdiv {
    position:fixed;
    top:0px;
    left:0px;
    width:100%;
    color:#CCC;
    background:#333;
    padding:8px;
}
div#bottomdiv {
    position:fixed;
    bottom:0px;
    left:0px;
    width:100%;
    color:#CCC;
    background:#333;
    padding:8px;
}
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

What actually you want friend, I mean collapsible and openable row in grid view or something else, if yes then it will be a bit difficult, I have faced the same problem before 5 months ago, and my lead advised me to use list view for achieving this functionality, and I did it using jQuery.
  Permalink  
Comments
Srivikas 15-Nov-12 12:23pm
   
Hi.. Thank u for your response. The grid I am going to use is very wide. i.e it has more number of columns. It is impossible to view all at a time in the window without scrolling. But the first two column are to be visible every time to understand the other details. SO i want to make them fixed and make the other columns scrollable.Have you got my point now? Waiting for your reply...

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 | Mobile
Web01 | 2.8.160621.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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