get index of selected row in datagridview c# code example Example: c# datagridview selected row index datagridview.CurrentCell.RowIndex