Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
Eddy Vluggen30-Nov-15 23:16
professionalEddy Vluggen30-Nov-15 23:16 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
smallkubi1-Dec-15 13:59
smallkubi1-Dec-15 13:59 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
Eddy Vluggen1-Dec-15 23:59
professionalEddy Vluggen1-Dec-15 23:59 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
smallkubi4-Dec-15 19:23
smallkubi4-Dec-15 19:23 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
Richard Deeming7-Dec-15 0:32
mveRichard Deeming7-Dec-15 0:32 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
smallkubi7-Dec-15 5:51
smallkubi7-Dec-15 5:51 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
Richard Deeming7-Dec-15 6:55
mveRichard Deeming7-Dec-15 6:55 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
smallkubi19-Dec-15 6:50
smallkubi19-Dec-15 6:50 
GeneralRe: how to use delegate to call function and introduce function as content? Pin
Richard Deeming4-Jan-16 2:21
mveRichard Deeming4-Jan-16 2:21 
QuestionOrder number of datagridview ? Pin
Member 245846729-Nov-15 15:36
Member 245846729-Nov-15 15:36 
AnswerRe: Order number of datagridview ? Pin
Eddy Vluggen30-Nov-15 2:28
professionalEddy Vluggen30-Nov-15 2:28 
GeneralRe: Order number of datagridview ? Pin
Member 245846730-Nov-15 15:04
Member 245846730-Nov-15 15:04 
QuestionMonitoring FTP-Server incomming Pin
gpc4427-Nov-15 3:40
gpc4427-Nov-15 3:40 
QuestionRe: Monitoring FTP-Server incomming Pin
Richard MacCutchan27-Nov-15 3:44
mveRichard MacCutchan27-Nov-15 3:44 
AnswerRe: Monitoring FTP-Server incomming Pin
gpc4427-Nov-15 3:50
gpc4427-Nov-15 3:50 
GeneralRe: Monitoring FTP-Server incomming Pin
Richard MacCutchan27-Nov-15 4:03
mveRichard MacCutchan27-Nov-15 4:03 
GeneralRe: Monitoring FTP-Server incomming Pin
Dave Kreskowiak27-Nov-15 4:10
mveDave Kreskowiak27-Nov-15 4:10 
GeneralRe: Monitoring FTP-Server incomming Pin
jschell27-Nov-15 6:05
jschell27-Nov-15 6:05 
QuestionHow do I pass data from child of child form to parent form in C#? Pin
naouf1026-Nov-15 5:34
naouf1026-Nov-15 5:34 
I am new to c#. I have the following in my project in windows forms:

Form1 with button and DataGridView.

Form2 with button.

Form3 with button and 3 textBoxes.

In form1, I click buttonOpenForm2 form2 pops up. Then in form2 I click buttonOpenForm3 form3 pops up which has 3 text boxes and button. Now the 3 forms are open.

now in form3, I enter values in textBox1, textBox2 and textBox3 and when click buttonAddRow ( from form3) I want these values to be inserted into the DataGRidView in Form1.

My question is: How can I add a row into DataGridView in Form1 ( parent) from form3 (child of child form) WITHOUT closing form2 and form3? I mean I want to pass the data while form2 and form3 are still open.

Please help me. Thank you


C#
Form1:

public partial class Form1 : Form
{


    public Form1()
    {
        InitializeComponent();

    }

    private void buttonOpenForm2 _Click(object sender, EventArgs e)
    {
        Form2 frm2 = new Form2();
        frm2.Show();
    }

}


Form2:

public partial class Form2 : Form
{
    public Form2()
    {
        InitializeComponent();
    }

    private void buttonOpenForm3 _Click(object sender, EventArgs e)
    {
        Form3 frm3 = new Form3();
        frm3.Show();
    }
}



Form3:

  public partial class Form3 : Form
  {
    public Form3()
    {
        InitializeComponent();
    }

    private void buttonAddRow _Click(object sender, EventArgs e)
    {
        //What to write here to insert the 3 textboxes values into DataGridView?

    }
}

AnswerRe: How do I pass data from child of child form to parent form in C#? Pin
OriginalGriff26-Nov-15 6:15
mveOriginalGriff26-Nov-15 6:15 
GeneralRe: How do I pass data from child of child form to parent form in C#? Pin
naouf1027-Nov-15 8:50
naouf1027-Nov-15 8:50 
GeneralRe: How do I pass data from child of child form to parent form in C#? Pin
OriginalGriff27-Nov-15 9:09
mveOriginalGriff27-Nov-15 9:09 
AnswerRe: How do I pass data from child of child form to parent form in C#? Pin
BillWoodruff26-Nov-15 12:07
professionalBillWoodruff26-Nov-15 12:07 
GeneralRe: How do I pass data from child of child form to parent form in C#? Pin
naouf1027-Nov-15 8:51
naouf1027-Nov-15 8:51 
AnswerRe: How do I pass data from child of child form to parent form in C#? Pin
susad7-Dec-15 3:05
susad7-Dec-15 3:05 

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.