Click here to Skip to main content
15,886,093 members
Home / Discussions / C#
   

C#

 
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 
Questionhow to accelebrate chart when have many series? Pin
smallkubi25-Nov-15 13:55
smallkubi25-Nov-15 13:55 
AnswerRe: how to accelebrate chart when have many series? Pin
Dave Kreskowiak25-Nov-15 16:56
mveDave Kreskowiak25-Nov-15 16:56 
GeneralRe: how to accelebrate chart when have many series? Pin
smallkubi25-Nov-15 18:19
smallkubi25-Nov-15 18:19 
GeneralRe: how to accelebrate chart when have many series? Pin
Dave Kreskowiak26-Nov-15 4:13
mveDave Kreskowiak26-Nov-15 4:13 
GeneralRe: how to accelebrate chart when have many series? Pin
smallkubi26-Nov-15 5:16
smallkubi26-Nov-15 5:16 
GeneralRe: how to accelebrate chart when have many series? Pin
smallkubi27-Nov-15 21:59
smallkubi27-Nov-15 21:59 
AnswerRe: how to accelebrate chart when have many series? Pin
Richard Deeming26-Nov-15 1:57
mveRichard Deeming26-Nov-15 1:57 
GeneralRe: how to accelebrate chart when have many series? Pin
John Torjo26-Nov-15 3:35
professionalJohn Torjo26-Nov-15 3:35 
GeneralRe: how to accelebrate chart when have many series? Pin
Richard Deeming26-Nov-15 3:40
mveRichard Deeming26-Nov-15 3:40 
GeneralRe: how to accelebrate chart when have many series? Pin
John Torjo26-Nov-15 3:41
professionalJohn Torjo26-Nov-15 3:41 
GeneralRe: how to accelebrate chart when have many series? Pin
Pete O'Hanlon26-Nov-15 5:16
mvePete O'Hanlon26-Nov-15 5:16 

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.