I have a WinForms form bound to a LLBLGen entity (although I believe this problem to not be specific to this binding source, I mention it just in case). My goal seems pretty simple: update another field on the form based on a calculation for the other fields.
My problem is that I want to reuse the same business logic that is used elsewhere on the form to do this computation and thus I am passing the bound entity to the business logic layer so it can be processed.
What I find strange is that I can't find a place in the focus chain (see: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.enter.aspx ) where I can use the bound entity in an updated form. The calculation is performed fine, but with the pre-update values.
I have worked around this in the past by grabbing values from .text, validating them as usable and going from there. I have also worked around it with "update" buttons: the click event can access the updated value, even if I was clicking immediately from editing a value.
Still, it seems like I'm missing something obvious: somewhere in the event chain the bound value should be updated and I should be able to run my calculation there.
My core question: what event should I be using to get access to the updated bound element in WinForms?