calling ShowDialog()
-
i am calling showDialog() for form2 from form 1 i want if i close the form2 changes made in form2 appears in form 1 it is fullfillng my requirement for first time but when i call showdialog() 2nd time and malke some chnaging in form 2 it does not appears in form 1....how to solve this problem?
-
i am calling showDialog() for form2 from form 1 i want if i close the form2 changes made in form2 appears in form 1 it is fullfillng my requirement for first time but when i call showdialog() 2nd time and malke some chnaging in form 2 it does not appears in form 1....how to solve this problem?
You haven't provided anywhere near enough information to answer this question. What does your code look like? How are you triggering the update? All this information is needed.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
i am calling showDialog() for form2 from form 1 i want if i close the form2 changes made in form2 appears in form 1 it is fullfillng my requirement for first time but when i call showdialog() 2nd time and malke some chnaging in form 2 it does not appears in form 1....how to solve this problem?
ShowDialog displays the form and waits for the user to close it with OK or Cancel before it returns. When it does, you can get the changed values from the form instance:
MyForm mf = new myForm();
mf.StringValue = "Hello";
if (mf.ShowDialog() == DialogResult.OK)
{
Console.WriteLine(mf.StringValue);
}
mf.StringValue = "Goodbye";
if (mf.ShowDialog() == DialogResult.OK)
{
Console.WriteLine(mf.StringValue);
}Works fine for me: What are you doing that is different?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
You haven't provided anywhere near enough information to answer this question. What does your code look like? How are you triggering the update? All this information is needed.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
both forms have text boxes and check boxes data is updated in database and fecthing is from sql qries and set into fom1 textboxes
And still no code. As it's the code that's wrong, don't you think that you should provide that or are you happy for us to throw random guesses around in the hope that one of them sticks like dung to a wall?
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility