Put a breakpoint in the following line and check the value of @Id
cmd.Parameters.AddWithValue("@Id", dataGridView1.Rows[i].Cells["Id"].Value);
Probably
Id is the primary key for the table and should be autogenerated.
Doing following should resolve your problem in this case
Auto increment primary key in SQL Server[
^]
Hope, it helps :)