I have a DataGridView where I set DataSource:
taskerEntities te = new taskerEntities();
var OMsMasterDescriptiveIndicators = te.MyT
I know this is an old topic, but an alternative solution (my code is vb.net, but I assume it would translate)
If WO_DGV.CurrentCell.RowIndex = i Then
'you cannot make invisible the row that is 'current'
WO_DGV.CurrentCell = WO_DGV.Rows(i - 1).Cells("act")
'to get to this code I know that there is a row before i, which is why I can use i-1 as new focus
End If
WO_DGV.Rows(i).Visible = False