Calculated field

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a bond fields database winform app. How can I calculate a field form
one of the bound fields and show on form?

Thanks

Regards
 
John,

I am an expert in cryptic answers, however in this case you are an expert in
my idea in cryptic questions.

Cor
 
I have a bound form...Ok?

However..one of the field does not need to be bound instead calculated from
one of the bound fields...how to do it?

Let's say DOB is coming from a bound field? How to setup a Age field which
calculates from DOB?

Regards
 
If your class is custom, (i.e. not generated from entity model), a simple
method is to add a readonly property to the class and put custom code in the
getter. I just run into this myself with Format event not firing on a
binding and can not figure out why (inside the new datarepeater control).
So I used a calculated property instead and bind to that. Works well and
imo is cleaner.
 
Back
Top