Again need help from this awsome comunity.
I have a WinForms app with DataGridView to display some data. There are especcialy two columns that are important to me. One is "Unit" and the second one is "Value". Unit has strings inside format and Value has numeric values. I would like to format the Value in each DataGridViewRow depending on what the Unit is. For example: if unit is 'piece', I need Value to be int (no decimal places). If unit is 'mm', I need to divide Value with 1000 and show two (2) decimal places and also change Unit to 'm'... Hope you understand. Also some graphic interpretation:
Unit Value ----> Wanted display format ----> Unit Value
piece 100,00 piece 100
mm 10000,00 m 10,00
g 100000,00 kg 100,00
What would be the right way to aproach this? Thank you for your help.