I have a dialog that I use for adding new items to my database.
The following code does not work in the Form_Load event, but will work if I call it from a button after the form has loaded. Does anyone have any ideas how I can accomplish this during the Form_Load?
try
{
this.BindingContext[objLicenseDetail1,"Contact_License"].EndCurrentEdit();
this.BindingContext[objLicenseDetail1,"Contact_License"].AddNew();
}
catch (System.Exception eEndEdit)
{
System.Windows.Forms.MessageBox.Show(eEndEdit.Message);
}