It is easy to scroll the DataGrid in full .NET Framework:
GridVScrolled(this, new ScrollEventArgs(ScrollEventType.LargeIncrement, rowNum));
– or even easier, just use DataGridView and DataGridView.FirstDisplayedScrollingRowIndex() property.
However, in .NET Compact Edition there is no DataGridView – and no GridVScrolled. So there is no easy method to scroll a certain row to the view – but that is exactly what I needed: if the DataGrid is resized, selected row must remain to be visible.
So I ended up using System.Reflection to scroll my grid – or to be more exact, I derived my own class from DataGrid and added a method ScrollToRow():
And then simply call baseGrid.ScrolToRow(baseGrid.CurrentRowIndex);