StrataFrame Forum

Return value from childform

http://forum.strataframe.net/Topic5633.aspx

By kkchan - 1/6/2007

Hi,

How could I return value from childform?



I have code as below. But, .NET unable to detect my property RegionID defined in my child form.





private void lnkRegion_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)

{

if (this.childFormDialog.ShowDialog() == DialogResult.OK)

{

this.cboRegion.Requery();

//this.cboRegion.SelectedValue = this.childFormDialog.childForm.RegionID;

}



}




Thank you
By Trent L. Taylor - 1/7/2007

If you are using a ChildFormDialog then only a DialogResult is returned.  Generally there is no reason to have a return value since in most cases, one or more BOs are shared between the child form and the calling form.  So all proper action can be taken on the child form.

If you want to return a value then call the child form manually and create a property to test on within the child form.  This is really the only way to "return" a value.

By kkchan - 1/8/2007

Once again, BOTranslation! w00t