StrataFrame Forum

New BO Property 'SetDirtyOnEdit'

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

By Tim Dol - 10/7/2006

I cannot find any documentation on this new property and have a question on how it's supposed to work with the Maintenance Form Toolstrip. When this property is set to 'True' (Default) and you click on edit button (IsDirty is set to True), New/Edit/Delete and Browse buttons are disabled, Save and Undo buttons are enabled and the save dialog is always displayed regardless if a change is made.

When SetDirtyOnEdit is 'False' and you click on edit, all the buttons on the toolbar are disabled and  'IsDirty' is only set when a value is changed. All the buttons remain disabled even if you change a value. 

Is there something I'm missing or is the intended behaviour? Shouldn't the toolbar buttons remain in their original state until a value is changed?

By Trent L. Taylor - 10/7/2006

Is there something I'm missing or is the intended behaviour? Shouldn't the toolbar buttons remain in their original state until a value is changed?

This is the intended behavior.  It is not recommended to use the MaintenanceFormToolstrip in the manner.  Regardless, when you set the SetDirtyOnEdit to False, the EditingStateChange event will not fire the same way, which is the event that triggers the MaintenanceFormToolstrip to update itself.  The reason for this is because the IsDirty state is changing, but the EditingState was never modified.  When using the standard MaintenanceFormToolstrip and standard maintenance forms, it is recommended to leave this property alone if you want the MaintenanceFormToolstrip to manage itself.  Otherwise you can create your own MaintenanceFormToolstrip and manage the buttons yourself based upon your desired behavior and the IsDirty property.