You didn't mention this second case in detail, so I couldn't begin to guess as to what you really want.
But regardless, this second case is almost the same: remember the first/last row you want to be visible and
call dataGrid1.ScrollIntoView(itemToScrollTo);
Remember that itemToScrollTo needs to be the DataRow of your DataTable.