I'm trying to display an integer in a read-only text field. I'm trying to apply a string format, but it doesn't seem to be working. Can someone tell me what I'm doing wrong? Here is the XAML:
<igDP:TextField Label="Size" AlternateBinding="{Binding Path=Size, StringFormat=\{0:N0\}}"/>
The column displays, but the "StringFormat" appears to get ignored.
Thanks!
Brad.
Hello Brad,
Thank you for posting! I have been looking into your post and it seems that I am missing something from your scenario. Would you please provide me with more detailed information about why you want to display an integer value in a TextField?
Once I have this information I would be able to provide you with more details on this matter.
Looking forward to hearing from you.
I'm sorry - now that I've re-read my original post, I realize it may not have been very clear. The "N0" in the string format should add a thousands separator (comma) to the display. It doesn't appear to do that.
I have been looking into your issue. What I can suggest is to use the Format property of the Field and set the Format as follows
<igDP:TextField Label="Size"
BindingType="UseAlternateBinding"
AlternateBinding="{Binding Size}"
Format="N0">
</igDP:TextField>
This way the thousands separator would show and the digits after the separator would not be visible.
Please do not hesitate to let me know if you have any further questions on this matter.
Thank you for the feedback. I am glad I was able to help.
Perfect! That is exactly what I was looking for. I don't know why I didn't see/try that.