This doesn't seem to work when I have fixed rows. The second and third rows are fixed. I'm trying to get the first row to scroll into view underneath them.
grid.ActiveRowScrollRegion.ScrollRowIntoView(grid.Rows[0]);
If I set grid.ActiveRowScrollRegion.FirstRow to grid.Rows[0] it works, but I would like to not necessarily move it to the top every time if the row is already visible. (It won't always be Rows[0] that I want scrolled into view.)
Is there a better way to do this besides calling ScrollRowIntoView, then checking if its visible, then setting it to FirstRow?
If you want to access a row but you don't know the index of the row, then what do you know about it? Which row do you want to access? What criteria do you want to use?
You could examine the cell of the row and look for some primary key value or something like that. Or maybe you can use the ListIndex of the row, which is the index of the row in the data source.
My apologies, I'm addressing the row incorrectly. The first fixed row becomes Rows[0], I think. How can I access them independent of their order in the grid? Something that won't change when you sort or fix rows?