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. Sync Scrolling

Sync Scrolling

Scheduled Pinned Locked Moved ASP.NET
javascriptcsshelpquestion
4 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.
  • L Offline
    L Offline
    liona
    wrote on last edited by
    #1

    Is it possible to have two grids next to each other on a page and synch them to where if you horizontally scroll one grid, the other also scrolls? I have found some javascript code that is suppose to help but my javascript isn't the strongest so if you can point me in the right direction to if this code should workk and where to put it that would be great I have tried several options but to no avail I can't get it working. Thanks for any help. <!-- document.getElementById('grd1').attachEvent('onscroll', doScroll); --> <!-- function doScroll() {grd2.scrollTop = grd1.scrollTop; } -->

    A M 2 Replies Last reply
    0
    • L liona

      Is it possible to have two grids next to each other on a page and synch them to where if you horizontally scroll one grid, the other also scrolls? I have found some javascript code that is suppose to help but my javascript isn't the strongest so if you can point me in the right direction to if this code should workk and where to put it that would be great I have tried several options but to no avail I can't get it working. Thanks for any help. <!-- document.getElementById('grd1').attachEvent('onscroll', doScroll); --> <!-- function doScroll() {grd2.scrollTop = grd1.scrollTop; } -->

      A Offline
      A Offline
      Arun Immanuel
      wrote on last edited by
      #2

      What problem do you face when you place both the Grids in a single Panel? I think it will solve your problem.

      Regards, Arun Kumar.A

      L 1 Reply Last reply
      0
      • A Arun Immanuel

        What problem do you face when you place both the Grids in a single Panel? I think it will solve your problem.

        Regards, Arun Kumar.A

        L Offline
        L Offline
        liona
        wrote on last edited by
        #3

        I have to keep the panels seperate. The problem I have is where actually to put the code in order to see if it will work or not. Otherwise I will just scrap it.

        1 Reply Last reply
        0
        • L liona

          Is it possible to have two grids next to each other on a page and synch them to where if you horizontally scroll one grid, the other also scrolls? I have found some javascript code that is suppose to help but my javascript isn't the strongest so if you can point me in the right direction to if this code should workk and where to put it that would be great I have tried several options but to no avail I can't get it working. Thanks for any help. <!-- document.getElementById('grd1').attachEvent('onscroll', doScroll); --> <!-- function doScroll() {grd2.scrollTop = grd1.scrollTop; } -->

          M Offline
          M Offline
          markymark82
          wrote on last edited by
          #4

          I would expect that the code should go at the top of the .aspx page. If it does not work there then it could be that needs to be: as doScroll is the name of the second function? As far as I can see that should work

          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