Hello,
I'm new to Rad controls and i'm having a problem accessing the parent radfrom of a child on (MDI not enabled). would appreciate the assistance.
in the parent form when i click a button it does this:
frmAddExtraItem fax = new frmAddExtraItem();
fax.Show(this);
and it shows the child form, but when i click a button in the child form the code is this:
((MainForm)this.ParentForm).dataGridView1.Rows.Add(insertitem.EDescription);
now datagridview1 is public, but this.ParentForm is always null, i tried all combinations possible for both code snippets, trying this.Parent, and even this.Parent.Parent multiple times, and also in the first code i tried fax.ParentForm = this, fax.Parent = this, and fax.Parent = this.Parent, and so on many combinations including fax.ShowDialog(), but nothing seems to work and i always get this.Parent or this.ParentForm as null, how can i access the dtatagridview1 in the parent in that case?
thank you
I'm new to Rad controls and i'm having a problem accessing the parent radfrom of a child on (MDI not enabled). would appreciate the assistance.
in the parent form when i click a button it does this:
frmAddExtraItem fax = new frmAddExtraItem();
fax.Show(this);
and it shows the child form, but when i click a button in the child form the code is this:
((MainForm)this.ParentForm).dataGridView1.Rows.Add(insertitem.EDescription);
now datagridview1 is public, but this.ParentForm is always null, i tried all combinations possible for both code snippets, trying this.Parent, and even this.Parent.Parent multiple times, and also in the first code i tried fax.ParentForm = this, fax.Parent = this, and fax.Parent = this.Parent, and so on many combinations including fax.ShowDialog(), but nothing seems to work and i always get this.Parent or this.ParentForm as null, how can i access the dtatagridview1 in the parent in that case?
thank you