Controls that belong to 'Dirty' properties #4046
Replies: 1 comment 6 replies
-
There is nothing built into Csla for this. I have a general suggestion for one way to approach this need. The base Csla classes do not track dirty per property. You could subclass BusinessBase and implement your own change tracking via overrides of PropartyHasChanged, OnPropertyChanging, LoadPropertyMarkDirty, MarkOld, and IsSelfDirty. If you want to track changed values on the server (useful for audit logging) and the change tracking fields are unmanaged, you will want overrides of OnGetChildren and OnSetChildren. This is the approach our company has taken, but I am not allowed to disclose more details. Once the business object has a method to query for which properties are dirty, you'll need UI code to connect the control to its bound property. My company does this within custom controls, but a helper class could probably be designed to work with a form and handle the dirty property checks and update the controls. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a Csla 4.xx application, part of which is in Winforms.
We inform users if they try to close a form with dirty properties.
Is there a way we could highlight the controls that correspond to dirty properties?
Kind Regards
Beta Was this translation helpful? Give feedback.
All reactions