protected int GetNewTopRowIndex(int previousTopRowIndex, int howMany)
{
int visibleRows = this.vScrollBar.LargeChange - 1;
bool down = (howMany > 0);
int max = Math.Abs(howMany);
int column = this.ColumnModel.NextVisibleColumn(-1);
CellPos newCell = new CellPos(previousTopRowIndex, column); // The row currently at the top
for (int i = 0; i < max; i++)
{
// The first cell on the row we are going to (if all is well)
// Changed to fix scrolling bug (ID - 2848790) reported by Tom Nolan ( lordicarus )
newCell = this.FindNextVisibleCell(newCell, true, down, false, false, true);
}
return newCell.Row;
}