I want to pass value from mdi child form to mdi parent form without refreshing the mdi parent form. when I open the child form from mdi parent form the code is here.
Product_Defination product_Defination = new Product_Defination("", "");
using (FetchProductsDetail fetchProductsDetail = new FetchProductsDetail("ProductDefine","",_userconfig))
{
fetchProductsDetail.MdiParent = product_Defination.ParentForm;
fetchProductsDetail.ShowDialog(this);
}
And now the code for fetching data from child form to parent form is given below:
Product_id = dataGridView1.CurrentRow.Cells[0].Value.ToString();
Product_Defination prod_define = (Product_Defination)this.ParentForm;
prod_define.get_productid_notifyme(Product_id);
Above code is giving error 'object reference not set to an instance of an object' Rememver that i have also used this.Owner instead of this.ParentForm Kindly Help.