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
170
Xam Data Grid Double Mask to hide trailing 0's in decimal places?
posted

In a XamDataGrid, I have a column that has a value in decimal.  To override the currency formatting, I am using this style:

 

 

<

 

Style TargetType="{x:Type igEditors:XamCurrencyEditor}">

 

 

 

<Setter Property="Mask" Value="{}{double:5.2}" />

 

 

 

</Style>

Is there any way to changes this Mask so that a value of 27.5 shows like that, instead of a 27.50?  The grid is not editable at all, it is purely for information purposes, but the client wants the 0's dropped.

Ive tried several different masks, using n's, #'s, and the like... nothing seems to hide the 0's

Parents
  • 69686
    Verified Answer
    posted

    Hello,

    The mask is used only when the editor is in edit mode. If you want to see no trailing zeros, when the editor is not in edit mode, you have to use the Format property, which uses standard .net formatting strings. For example, you can use this:

    Format="####.##"

Reply Children
No Data