I have a form that serves as a single maintenance form for many very simple BO's. The user selects the table they want to maintain and the control bindings are created, all works fine but the textboxes would NOT clear upon a call to the forms add method. Eveything else worked fine. I added an event handler to manually clear it but I am wondering why I had to do that and if anything is "wrong" since it didnt work as expected. Any ideas?Binding Code Snippet:
Dim strBOname As String = cboTables.SelectedValueDim typeRef As TypetypeRef = MicroFour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(strBOname)
boMaintenance =
CType(Activator.CreateInstance(typeRef), BusinessLayer)boMaintenance.ParentContainer =
MeboMaintenance.SynchronizingObject =
MeMe.BusinessObjects.Add(boMaintenance)txtValue.BusinessObject = boMaintenance
txtValue.BindingField = boMaintenance.AllFieldsList.Find(
AddressOf findBindingValue)txtValue.Refresh()
Dim boCastToParent As ObjectboCastToParent =
CType(boMaintenance, RTIC.BUSINESS.SQLBASEBO)boCastToParent.FillByTableName(cboTables.Text)
boMaintenance.CopyDataFrom(boCastToParent, BusinessCloneDataType.ClearAndFillFromDefaultView)
boMaintenance.Filter = boMaintenance.AllFieldsList.Find(
AddressOf findPKField) & " >= 10"boMaintenance.SetDirtyOnEdit =
TrueMe.PrimaryBusinessObject = boMaintenanceFor Each Control In Me.pnlAllControls.ControlsIf TypeOf (Control) Is UI.SDSI_cmdDataButton ThenCType(Control, UI.SDSI_cmdDataButton).BusinessObject = Me.PrimaryBusinessObjectEnd IfNextboMaintenance.Navigate(BusinessNavigationDirection.First)
Me.pnlAllControls.Visible = TrueupdateButtonState()
Me.cboTables.Visible = FalseMe.lblSelection.Visible = FalseMe.RefreshBusinessObjects()Me.Refresh()AddHandler boMaintenance.EditingStateChanged, AddressOf ClearTextBox