c# datagridview selected line number code example Example: c# datagridview selected row index datagridview.CurrentCell.RowIndex