Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 at 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 730
1 OriginalGriff 503
2 Abhinav S 278
3 thatraja 245
4 Emre Ataseven 190
0 Sergey Alexandrovich Kryukov 8,322
1 OriginalGriff 4,790
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid