As I understand,
Form1 ---> Form2 (now when it close pass result to already opened form1 again)
you should do this in your form2
-> In
form2 (in which you have write methoddeclare form level public variables Return_Cust_code,Return_Cust_Nm
-> now
set that variables in form close method instead of that new form opening code you have mention in question
Return_Cust_code = dataGridView1.CurrentRow.Cells[0].Value.ToString();
Return_Cust_Nm = dataGridView1.CurrentRow.Cells[1].Value.ToString();
this.DialogResult= Dialogresult.ok;
this.Close();
-> now in
Form1 receive these varibles like this
Form1 frm = new Form1();
if (frm.ShowDialog() == Dilogresult.OK)
{
string cc = frm.Return_Cust_code;
string cn = frm.Return_Cust_Nm;
}
Happy Coding!
:)