Users Pricing

forum

Home Forums Add a datagridview collumn from another form – MindStick

Add a datagridview collumn from another form

Anonymous User 2128 18 Aug 2014

I have two forms and a datagridview which is in the form1.Im trying to add a new column by clicking in a button from form2.Like that:

 Form2

    private void button1_Click(object sender, EventArgs e)
    {
        Form1 form1 = new Form1();
        form1.dataGridView1.Columns.Add("test" , "test");
    }

How can I do that?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md