|
-
Mar 14th, 2004, 03:52 AM
#1
Thread Starter
Junior Member
from datagrid in one form to a textbox in another form
this is a major major problem for me...i could fail my module if i dont implement this in my system!!
i've downloaded some examples from this site but i could not understand whats it doing..and how to implement it in my forms..im hoping some one out there can help me out here...it'll be one reall really appreciated help.
anyways this is my situation, i have frmQueue which has a datagrid showing only one column (ACCT ID) and another form named frmDiagnosis which has got a textbox called txtACCTID. the user clicks on the first cell in the datagrid in frmQueue and it gets loaded in the textbox in frmDiagnosis.
pls some one help me here. im new to C# so the examples really make me feel blur...
-
Mar 14th, 2004, 06:47 PM
#2
Addicted Member
Question, is the problem getting the account id from the grid or is the problem displaying the data in the other form?
-
Mar 14th, 2004, 07:41 PM
#3
Thread Starter
Junior Member
from datagrid in one form to a textbox in another form
its passing the data to the other which is the prblem, hope u can help me out here tewl
thx in advance
-
Mar 15th, 2004, 08:01 AM
#4
Addicted Member
is frmDiagnosis opened from frmQueue or visa vera or is there a third form?
You could try passing a reference of the other form in the constructor.
-
Mar 15th, 2004, 08:11 AM
#5
Thread Starter
Junior Member
frmQueue is opened from frmDiagnosis.
thx for the hint tewl..but if u dont mind could u show me an example with simle coding of the constructor??. im kinda new to the programming world
-
Mar 15th, 2004, 08:56 AM
#6
Addicted Member
frmQueue
Code:
// Reference variable
// When you want to add text to txtACCTID
// do parent.txtACCTID.Text = whatever
private frmDiagnosis parent;
// constructor
public frmQueue(frmDiagnosis p)
{
this.parent = p;
}
frmDiagnosis open frmQueue
Code:
// Open frmQueue passing reference of the frmDiagnosis
frmQueue f = new frmQueue(this);
f.Show();
that help?
-
Mar 15th, 2004, 10:41 AM
#7
Thread Starter
Junior Member
YAHOO!
thx Tewl...that helped??....IT WORKED!!!!...thx again!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|