Click here to Skip to main content
15,906,574 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am doing the project in that i have problem..in i am taken a one button on that button click open one form is the reset the values on main form...that form reset the value but they show on main form...so please send the solution............
Posted
Comments
Manoj K Bhoir 26-Nov-11 1:50am    
Please provide more details about your problem.
[no name] 26-Nov-11 4:12am    
your problem seems easy, but the question itself makes us confused. Please clarify your question or give us a good example.

Put all your form filling logic in a method called FillForm etc. and just call that method.

C#
private void Form1_Load(object sender, EventArgs e)
{
    FillForm();
}

private void FillForm()
{
   // fill your form with values
}

public void ResetForm()
{
    FillForm();
}
 
Share this answer
 
To relodr or repaint your Form or any control use Invalidate() method.
C#
this.Invalidate();

It will rapaint/reload the control
 
Share this answer
 
Comments
Mehdi Gholam 26-Nov-11 1:58am    
Calling Invalidate() will not repopulate data.
Sergey Alexandrovich Kryukov 27-Nov-11 0:11am    
Yes, absolutely irrelevant.
--SA

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