It could be silly question but it is bothering me. So I am passing datatable which is populated in the form1 and assigned to the data grid.
considering in mind that my_dt is already assigned to data grid as datasource.
form1 call form2
form2 form = new form2(my_dt);
form.show();
Form2
public partial class form2 : Form
{
Datatable table;
public form2(Datatable dt)
{
table = dt;
}
}
in this form later on I am changing the column names of table and adding more columns to it. when I am calling the function which is changing the table columns when it is finished it is changing the table columns in data grid. The form2 is still open and the datagrid is in form1.
Why it is happening?