Skip to main content

Using SmartObjects in a CultureInfo with a different number format (e.g. German) there is a problem storing decimal values.


When I store the values I can use the number format of the invariant culture as a number format provider in the ToString method:


NumberFormatInfo nfi = CultureInfo.InvariantCulture.NumberFormat;


soCosts.Properties

Value =  _TotalCosts.ToString(nfi));


Reading the values from the SmartBox there are two results:


If I read with Get List the values are read correctly: e.g. 1000,00 in the database with UI culture german converts to 1000 in the string of the SmartObject.Propertiese"TotalCosts"].Value. If I use the Load method the result of the same property is 100000.


How can I tell SmartObjects to use the correct NumberFormatInfo as of the Save method. What's the difference between the Get List and the Load method concerning the NumberFormatInfo?


Thanx


Georg

Be the first to reply!

Reply