hi all
i create a Form and bind to a UDO
when i only open the form is not any problem ,the method is following:
protected override bool AddItems2Form(string strFId, string strTitle)
{
Boolean bRet = base.AddItems2Form(strFId, strTitle);
try
{
if (bRet && ShowForm(strFId, strTitle, BoFormBorderStyle.fbs_Sizable, 110, 550, 74,60, "LicCarry") == 0) //LicCarry is a UDO's Name ,the table name is @LICCARRYCARDINFO
{
strDocEntry = "14";
fsSbo.AddEditText2Form(ref oForm, "Doc", "@LICCARRYCARDINFO", "DocEntry", 1, 1, 20, 14);
fsSbo.AddStaticText2Form(ref oForm, "stLicId", "XXXXX", 0xa, 20, 80, 14);
......................... // much more
#region funtion button
fsSbo.AddItem2Form(ref oForm, "1", BoFormItemTypes.it_BUTTON, 410, 20, 65, 20);
fsSbo.AddItem2Form(ref oForm, "2", BoFormItemTypes.it_BUTTON, 410, 90, 65, 20);
#endregion
#region
oForm.PaneLevel = 1;
oForm.DataBrowser.BrowseBy = "Doc";
if (strDocEntry.Length > 0)
{
oForm.Mode = BoFormMode.fm_FIND_MODE;
fsSbo.SetValue2EditText(ref this.oForm, "Doc", strDocEntry);
fsSbo.SetFocus(oForm, "1");
}
else
{
oForm.Mode = BoFormMode.fm_ADD_MODE;
}
#endregion
}
}
catch (Exception ex)
{
fsSbo.ShowExceptiontMsg(ex);
}
return bRet;
}
but when first open a Form x ,and then catch x's event to open above form
the exception (form - bad value) is throw on fsSbo.SetValue2EditText(ref this.oForm, "Doc", strDocEntry);
any one can help you ,thanks
thanks very much