How do you change the precision of the default xamNumericEditor in xamDataGrid?
As of now is only allows for a presision of of two, 0.00, but I need three 0.000
I have tried a couple of things, but none have worked.
Hello,
You should create a style for the XamNumericEditor and set its mask property. You can see how to create a mask here.
For example:
Mask = "nnn,nnn,nnn.nnn" as 'n' is a placeholder for a digit but not required; '#' like 'n' is a digit placeholder, but the digit is required.
You can also use this :{double:-i.f:c}
Please let me know if you have any questions on this.
Alex,
This example is in storage can you put out an updated link. Thank you ( Again )
realized the mask I specified is incorrect. I'm using: nnnn,nnnn,nnn.nnnnnn
Thanks,Joe
jeez ! either i got twiddly fingers are the post editor is playing games !
here's the ACTUAL mask: nnn,nnn,nnn.nnnnnn
dont want to spam anymore so: 9 digits before and 6 digits after the decimal
Joe,
Yes, but the Mask property has effect only when the editor is in edit mode. It prompts you what is the format of the input that you have to make. The Format property has effect when the editor is not in edit mode and displays the data. The Format property requires standard format strings. So, what you are trying to achieve is this:
Format="###,###,###.######"
Hi Alex,
I have a requirement wherein I need to display the % sign as well as single digit after the decimal. Can you pls help me on this.
I got it working by providing the Format property this way -
percentStyle.Setters.Add(new Setter(XamNumericEditor.FormatProperty, "###############.0%"));
earlier I was setting the FormatProperty to "P" which was the problem.