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
Set the UltraGridColumn.Format property to "0.##". The '#' character means only show the zero if it is significant.
Thank you Brian,
This does the job, in fact !