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