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. Problem with buttons in a gridview with frozen headers [modified]

Problem with buttons in a gridview with frozen headers [modified]

Scheduled Pinned Locked Moved Web Development
csshelp
2 Posts 1 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
    Neophyte30
    wrote on last edited by
    #1

    I have a gridview with Select buttons in the first column. There are lots of rows, and I have set up CSS to freeze the header row in place as the table is scrolled (using position:relative). I also have CSS set up for the hover event of the button which highlights the button with a nice black border. The problem arises when the containing div is scrolled. If the cursor is moved over any one of the buttons, the header row suddenly jumps to it's scrolled position (a lot of the time this is too far north and it just disappears). Scroll back to the top of the grid, and hover again - it's back! Any diagnoses and possible cures greatly appreciated. p.s. Yes I have considered creating a custom control inheriting from Gridview, but this seems like a lot of work when the solution I currently have is so close to perfect...

    modified on Wednesday, February 06, 2008 6:13:54 AM

    N 1 Reply Last reply
    0
    • N Neophyte30

      I have a gridview with Select buttons in the first column. There are lots of rows, and I have set up CSS to freeze the header row in place as the table is scrolled (using position:relative). I also have CSS set up for the hover event of the button which highlights the button with a nice black border. The problem arises when the containing div is scrolled. If the cursor is moved over any one of the buttons, the header row suddenly jumps to it's scrolled position (a lot of the time this is too far north and it just disappears). Scroll back to the top of the grid, and hover again - it's back! Any diagnoses and possible cures greatly appreciated. p.s. Yes I have considered creating a custom control inheriting from Gridview, but this seems like a lot of work when the solution I currently have is so close to perfect...

      modified on Wednesday, February 06, 2008 6:13:54 AM

      N Offline
      N Offline
      Neophyte30
      wrote on last edited by
      #2

      I got around this problem for the prototype demo by not having enough data to require scrolling! For the production version I will probably create a custom gridview inheriting from Gridview, or dolly up a Repeater with some sorting capabilities. However, I'm still curious as to what would cause this. I assume it's client side (IE only - not tried in FF) as I don't see any postback or page refresh. Any thoughts?

      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