1. Add a Timer to your Windows Form project. Set its 'Interval property to the value in milliseconds you want.
a. create an integer variable, and set its value to the index of the row you want initially displayed at the top of the DataGridView.
int firstRowDisplayed = 200;
b. create an integer variable whose value is total number of rows -1.
int lastRowIndex = dataGridView1.Rows.Count -1;
2. use the integer FirstDisplayedScrollingRowIndex property (has get, and set) of the DataGridView to make sure the initial row you want displayed is visible.
dataGridView1.FirstDisplayedScrollingRowIndex = firstRowDisplayed;
3. trigger the Timer in whatever way you wish (by Button EventHandler, in a Form Load or Shown EventHandler, whatever).
4. in the Timer Code 'Tick EventHandler:
a. do the right thing to increment the firstRowDisplayed variable and select the topmost visible row in the DataGridView. Incrementing will essentially scroll the DataGridView "up."
5. So, how do I make it go up, until the last row is at the top, and then back down until the first row is at the top ?
a. left for you to figure out :)
Hint: have a boolean variable which you will use inside the 'Tick EventHandler to determine whether you increment or decrement 'firstRowDisplayed based on comparing if its current value is equal to the last row (in which case firstRowDisplayed == lastRowIndex), and you the want to start scrolling back to the top, or (if moving up) is equal to zero, in which case you to start scrolling back towards the bottom.
6. plan for how you wish to determine when the "animation" will stop, at which point you will disable the Timer.