Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please Please please Help me .........

I have made a C# .Net application ...

On the customer search form i have used gridview to display the customer names (In Rows)

To open the records of that customer(Row) i have used CellDoubleClick function ..
of gridview with codes

C#
    strBillID = dgvBillList.Rows[e.RowIndex].Cells[0].Value.ToString();
    strBuyBillID = dgvBillList.Rows[e.RowIndex].Cells[1].Value.ToString();
    strCustID = dgvBillList.Rows[e.RowIndex].Cells[7].Value.ToString();
}

this.Close();



Now since i have used this.Close(); at the end it closes the search form

So to edit the next customer details i need to search that again ...

I just want to keep that form active at the time of double click & i also want to
open the records for the next custmoer whose name is clicked ....



Any help will be appreciated ...


Please help me


Thanks in advance .........

Rajkumar Saroj
Posted
Updated 15-Oct-11 3:38am
v2

1 solution

The Close method just closes the form - it doesn't throw away the data, or change any properties. Provided you haven't thrown away the reference you created when you first showed it, there is nothing stopping you from just using the Form.Show or Form.ShowDialog again.

C#
private MyForm myform = new MyForm();
...
private void DoSomething()
   {
   myform.ShowDialog();
   ....
   myForm.ShowDialog();
   }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900