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. General Programming
  3. C#
  4. DataGrid + vertical Scrollbar

DataGrid + vertical Scrollbar

Scheduled Pinned Locked Moved C#
question
4 Posts 2 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.
  • T Offline
    T Offline
    totig
    wrote on last edited by
    #1

    Hi does anyone know how it is possible to control a datagrids scrolling from a vertical scrollbar? I am trying to see if I can use this to scroll the datagrid, but am having no luck so far. Is there anyway to pass the scroll event from the vScrollbar to the datagrid?

    W 1 Reply Last reply
    0
    • T totig

      Hi does anyone know how it is possible to control a datagrids scrolling from a vertical scrollbar? I am trying to see if I can use this to scroll the datagrid, but am having no luck so far. Is there anyway to pass the scroll event from the vScrollbar to the datagrid?

      W Offline
      W Offline
      Wjousts
      wrote on last edited by
      #2

      What exactly are you trying to accomplish? If you set the CurrentRow of a datagrid it should automatically scroll to that row. I tried controlling the horizontial scroll bar on a DataGrid once, but I didn't have much luck. I could get it to move but the DataGrid itself wouldn't update.

      T 1 Reply Last reply
      0
      • W Wjousts

        What exactly are you trying to accomplish? If you set the CurrentRow of a datagrid it should automatically scroll to that row. I tried controlling the horizontial scroll bar on a DataGrid once, but I didn't have much luck. I could get it to move but the DataGrid itself wouldn't update.

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

        Hi, I actually solved what I needed to using CurrentRowIndex. Do you know of a way to turn the datagrid scrollbars off?

        W 1 Reply Last reply
        0
        • T totig

          Hi, I actually solved what I needed to using CurrentRowIndex. Do you know of a way to turn the datagrid scrollbars off?

          W Offline
          W Offline
          Wjousts
          wrote on last edited by
          #4

          I don't. Perhaps you could search the control collection of the datagrid for the scroll bar and then remove it from the collection? However, I suspect that the second you add another record or resize the datagrid it would get recreated.

          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