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