Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Formatting double as integer
posted

Hi there,

Here is the scenario: I have a list of entities, let's say OrderDetails for example. The "Quantity" property type of the OrderDetail entity is a Decimal. Data are stored in a Decimal(10,4) format in the matching OrderDetail Sql table.

In fact, I sometimes need to store values like "11,1111" so I need this precision. But sometimes, and more often, I only need 'integer' values like "11" for example. This works fine, data are stored as expected ("11" is stored as "11,0000").

When a user enters "11" in the quantity column and exit the cell, the data displayed is "11,0000", wich is the expected behaviour, but causes difficulties in reading..


Is there a way to display the value without the leading zero ?


Hope I made myself clear :-)
(Ok, my english is so bad t.. here is  a little screenshot)

Any help would be greatly appreciated.. thank you !

François

 

Parents
No Data
Reply Children