It looks like you aren't sending the row index, but rather the converted to integer value of the first cell of the current row.
Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString()));
Why are you doing that instead of just this:
dataGridView1.CurrentRow.Index
Update:
Go ahead and use SelectedRow instead, use
Convert.ToInt32(SelectedRow.ItemArray[0])