views:

24

answers:

2

I have grid, where I have a lot of records.

There is operation like selecting row, and in other window I do some things with this row.

So i have a delegate to the second window.

When delegate is fired I'm refreshing my grid.

I don't know how to lock slider to be in place, where I select this old record.

So, if this record wa 43th, now I want to select 43th row (it could be another record, but the same position).

Is is possible?

A: 

Within your delegate you could take a look into the CurrentRow property of your master DataGridView. With this informations do a call to DataGridView.Rows.IndexOf() and use this index in your slave Grid SetSelectedRowCore() to set the wanted index.

Oliver
A: 

It is what I wanted:

myDataGrid.FirstDisplayedScrollingRowIndex = e.RowIndex;