My question is how to best do this when binding to a BO field. There seems to be some odd behavior in which it is struggling to know whether to use the data in the BO or the data in the field. How do I make this work correctly??
I am doing this type of thing by having the BO raise a field changed or changing event and then handling that event and setting the values. It works out great except if with a business binding source, then you will run into some issues with this appoach.
You can also just add the code to the set method of the field to change the values of the other fields as well.
''' <summary>
<Browsable(
BusinessFieldDisplayInEditor(), _
Description("cki_Amount"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Pauls example is very good and it will keep the logic within the BO using this approach and it is probably the cleanest solution. There are also times that this may be more of a "one-time-thing" and I might handle a SelectedIndexChanged event or a TextChanged event, something of that nature, to add the logic. However, this does break encapsulation and if the same logic is required in another location then you are asking for a bug. The best and safest approach is Pauls example.
Get the fix here: http://forum.strataframe.net/Topic11831-10-1.aspx#bm11844