Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. css for freezing header in gridview

css for freezing header in gridview

Scheduled Pinned Locked Moved ASP.NET
css
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NidhiKanu
    wrote on last edited by
    #1

    Hi, I am using gridview component and b'cas of lengthy data i need to freeze my grid header for its height. N!dh! :)

    A 1 Reply Last reply
    0
    • N NidhiKanu

      Hi, I am using gridview component and b'cas of lengthy data i need to freeze my grid header for its height. N!dh! :)

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      You can Freeze. This is you CSS Class

      .HeaderFreez
      {
         position:relative ;
         top:expression(this.offsetParent.scrollTop);
         z-index: 10;
      }
      

      and set GridView HeaderStyle as following

      cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

      T N 2 Replies Last reply
      0
      • A Abhijit Jana

        You can Freeze. This is you CSS Class

        .HeaderFreez
        {
           position:relative ;
           top:expression(this.offsetParent.scrollTop);
           z-index: 10;
        }
        

        and set GridView HeaderStyle as following

        cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

        T Offline
        T Offline
        ToddHileHoffer
        wrote on last edited by
        #3

        I stand corrected. That's pretty sweet.

        I didn't get any requirements for the signature

        1 Reply Last reply
        0
        • A Abhijit Jana

          You can Freeze. This is you CSS Class

          .HeaderFreez
          {
             position:relative ;
             top:expression(this.offsetParent.scrollTop);
             z-index: 10;
          }
          

          and set GridView HeaderStyle as following

          cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

          N Offline
          N Offline
          NidhiKanu
          wrote on last edited by
          #4

          Hi, In this case our header is not constant,i need header to be constant and inside grid records should be moved N!dh! :)

          A 1 Reply Last reply
          0
          • N NidhiKanu

            Hi, In this case our header is not constant,i need header to be constant and inside grid records should be moved N!dh! :)

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            NidhiKanu wrote:

            In this case our header is not constant,i

            I didn't get you :confused: . It is not freezing your grid header? You can also read This[^] article.

            cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

            N 1 Reply Last reply
            0
            • A Abhijit Jana

              NidhiKanu wrote:

              In this case our header is not constant,i

              I didn't get you :confused: . It is not freezing your grid header? You can also read This[^] article.

              cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

              N Offline
              N Offline
              NidhiKanu
              wrote on last edited by
              #6

              Ya i want same thing but wen i apply it on my grid,some time it happen that header become invisible or while scrolling on grid my header goes invisible after some time it goes visible.Is there any solution for it N!dh! :)

              modified on Tuesday, January 27, 2009 12:36 AM

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups