how to get the row index in datagridview c# code example Example: c# datagridview selected row index datagridview.CurrentCell.RowIndex