i have an issue with my maintanance forms allways starting with the maintanance toolstrip showing the save and undo buttons enabled and the navigate buttons disabled.
i guess this is because automations on the form cause the bo to become dirty. ?
so within the bo, i tried this, to set it "undirty":
protected override void OnIsDirtyChanged(bool DirtyShouldBe) { if (this.isDirty && this.EditingState == BusinessEditingState.Idle) this.Save(); base.OnIsDirtyChanged(DirtyShouldBe); }
however, this throws a stackoverflow exception.
So, what is the appropriate way to handle this ?
thanks.
on the form there are two of thoose. if i unbind them by selecting Business-Object = none in the property editor, the form behaves correctly (bo doesnt get dirty). however off course then they are not bound
i am setting default values to thoose from the bo's SetDefaultValues procedure. however this aint the cause of the problem, because if i comment theese lines out, the bo still gets dirty.
the datetime picker controls are set up with following property values:
BindableValue = 01.01.1800BindingField = MyDateTimeFieldBindingProperty = ValueBindingUpdateMode = OnPropertyChangedBusinessObject = MyBOClearOnNULL = TrueCustomFormat = dd.MM.yyyy HH:mm:ssFormat = CustomMaxDate = 31.12.9998MinDate = 01.01.1753NullDateValue = 01.01.1800ShowUpDown = TrueStripTimeFromValue = FalseValue = 01.01.1800