Right now your code is reversed. You delete the row and then try to read its values. Put the delete last and if you coded it right, you should get the information you want. Here is what it should look like:
string stock_code =dataGridView1.CurrentRow.Cells[0].Value.ToString();
string q = dataGridView1.CurrentRow.Cells[0].Value.ToString();
dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index);