Force re-format on databound controls

  • Thread starter Thread starter Smith.BarryP
  • Start date Start date
S

Smith.BarryP

I have a program that uses displays data with scientific units. The
user can select which particular unit they wish to see the values in
(Kelvin, Celsius, etc...). I have handled this by implementing a
conversion in the Format and Parse events. However, if the user
changes the configuration options, the old values persist until the
row being inspected is changed. (e.g. A textbox displays 273 when the
user has Kelvin selected. If the user changes to Celsius, I want the
value to be shown as zero as soon as the user changes the units,
however it will show 273 until the user changes the row being
inspected, thus calling parse again).

I know I can brute force this fairly easily by manually calling Parse
for the relevant textboxes, but that seems like a terrible idea.

So, I would basically like to force the program to use the
databindings I have set up to reload the data into the textboxes,
without changing the position of the BindingContext of the form.

Any help would be greatly appreciated.

Cheers

- Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top