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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Row position after reloading datagrid

Row position after reloading datagrid

Scheduled Pinned Locked Moved C#
visual-studiohelpquestionannouncement
5 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.
  • M Offline
    M Offline
    michael_jhons
    wrote on last edited by
    #1

    Hello everybody, VS 2003. i'm displaying a datatable inside a dataGrid, at each update i'm doing, i must reload the datagrid. i need to know how can i maintain the row or the scroll position after reloading the datagrid. thanks in advance for your help,and best regards

    M 1 Reply Last reply
    0
    • M michael_jhons

      Hello everybody, VS 2003. i'm displaying a datatable inside a dataGrid, at each update i'm doing, i must reload the datagrid. i need to know how can i maintain the row or the scroll position after reloading the datagrid. thanks in advance for your help,and best regards

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      michael_jhons wrote:

      i need to know how can i maintain the row or the scroll position after reloading the datagrid.

      You can explicitly set VerticalScrollingOffset property after each refresh.

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      M 1 Reply Last reply
      0
      • M Manas Bhardwaj

        michael_jhons wrote:

        i need to know how can i maintain the row or the scroll position after reloading the datagrid.

        You can explicitly set VerticalScrollingOffset property after each refresh.

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        M Offline
        M Offline
        michael_jhons
        wrote on last edited by
        #3

        dear Manas, thank you so much for your reply, but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control. is it possible that i can use this property in my case ? Best regards

        M 1 Reply Last reply
        0
        • M michael_jhons

          dear Manas, thank you so much for your reply, but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control. is it possible that i can use this property in my case ? Best regards

          M Offline
          M Offline
          Manas Bhardwaj
          wrote on last edited by
          #4

          michael_jhons wrote:

          but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control.

          Oops..I dont have VS2003 here... :^)

          michael_jhons wrote:

          is it possible that i can use this property in my case ?

          No You can not. Try to implement like this[^]. I remember that I have implemented this fro datagrid in past using some trick which I do not remember anymore. :doh:

          Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

          M 1 Reply Last reply
          0
          • M Manas Bhardwaj

            michael_jhons wrote:

            but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control.

            Oops..I dont have VS2003 here... :^)

            michael_jhons wrote:

            is it possible that i can use this property in my case ?

            No You can not. Try to implement like this[^]. I remember that I have implemented this fro datagrid in past using some trick which I do not remember anymore. :doh:

            Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

            M Offline
            M Offline
            michael_jhons
            wrote on last edited by
            #5

            :) ok Manas, thank you for your concern, i'll try the scrollToRow class taht you gave me.hope it works thank you

            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