Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to get present item from generic list using c# Pin
Anthony Mushrow10-Dec-07 0:09
professionalAnthony Mushrow10-Dec-07 0:09 
AnswerRe: how to get present item from generic list using c# Pin
CKnig10-Dec-07 0:58
CKnig10-Dec-07 0:58 
Generalupdates on stored procedure does not appear on dataset Pin
subai9-Dec-07 23:48
subai9-Dec-07 23:48 
GeneralSwitching Internet connections Pin
new2pgrmg9-Dec-07 23:47
new2pgrmg9-Dec-07 23:47 
Generalproblem with propertygrid Pin
Deglimmer9-Dec-07 23:43
Deglimmer9-Dec-07 23:43 
GeneralRe: problem with propertygrid Pin
visualhint13-Dec-07 11:36
visualhint13-Dec-07 11:36 
Generalproblem to load Data from form2 to form1.gridView Pin
hdv2129-Dec-07 23:32
hdv2129-Dec-07 23:32 
GeneralRe: problem to load Data from form2 to form1.gridView Pin
CKnig10-Dec-07 1:10
CKnig10-Dec-07 1:10 
So you have: Form1 with Button 1 and Form2 with Button 2 - if you klick Button 1, a new Form2 window should appear and if you then click on Button 2 in it, the first form (Form1) shall Load the data right?

Ok you will have to do something like this:

in Form2 declare a public function SetForm1 - that sets an internal variable to an object of Form1, then in the first button click use:
<br />
Form2 frm = new Form2();<br />
frm.SetForm1(this);<br />
frm.Show();<br />


and in Buttonclick of Form2:
<br />
_form1Var.LoadData();<br />


The problem is simple: in your code you create a new Form1 object (that you will never see - you never use it's Show-method) and fire LoadData against this!

Bye the way: you should not interweave two forms in such a way - use events of public functions for such tasks.
GeneralRe: problem to load Data from form2 to form1.gridView Pin
hdv21210-Dec-07 2:50
hdv21210-Dec-07 2:50 
GeneralRe: problem to load Data from form2 to form1.gridView Pin
CKnig10-Dec-07 2:56
CKnig10-Dec-07 2:56 
Generalchecking for a _ Pin
eyeseetee9-Dec-07 23:07
eyeseetee9-Dec-07 23:07 
GeneralRe: checking for a _ Pin
Bekjong9-Dec-07 23:24
Bekjong9-Dec-07 23:24 
GeneralRe: checking for a _ Pin
eyeseetee9-Dec-07 23:52
eyeseetee9-Dec-07 23:52 
GeneralDOM in C# Pin
Yoyosch9-Dec-07 22:45
Yoyosch9-Dec-07 22:45 
Generalchecking for a value Pin
eyeseetee9-Dec-07 22:40
eyeseetee9-Dec-07 22:40 
GeneralRe: checking for a value Pin
Bekjong9-Dec-07 23:22
Bekjong9-Dec-07 23:22 
GeneralC#.NET windows services Pin
D i x y9-Dec-07 22:39
D i x y9-Dec-07 22:39 
GeneralRe: C#.NET windows services Pin
Bekjong9-Dec-07 23:31
Bekjong9-Dec-07 23:31 
GeneralRe: C#.NET windows services Pin
Ujjaval Modi10-Dec-07 0:13
Ujjaval Modi10-Dec-07 0:13 
GeneralRe: C#.NET windows services Pin
CKnig10-Dec-07 0:31
CKnig10-Dec-07 0:31 
GeneralRe: C#.NET windows services Pin
DaveyM6910-Dec-07 1:41
professionalDaveyM6910-Dec-07 1:41 
Generalc# windows control fails to load in the webpage Pin
Naveen Gowda9-Dec-07 22:13
Naveen Gowda9-Dec-07 22:13 
GeneralRe: c# windows control fails to load in the webpage Pin
Paul Conrad10-Dec-07 10:31
professionalPaul Conrad10-Dec-07 10:31 
GeneralRe: c# windows control fails to load in the webpage Pin
RichardGrimmer11-Dec-07 5:46
RichardGrimmer11-Dec-07 5:46 
GeneralRe: c# windows control fails to load in the webpage Pin
RichardGrimmer11-Dec-07 22:23
RichardGrimmer11-Dec-07 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.