Hi, I have a XamComboEditor in a grid that is using its own ItemTemplate with a converter. When the cell is in edit mode, everything looks fine, however, when I leave edit mode, the display text of the cell is not using my converter. In particular, I have a decimal value and a converter to make it look like a currency value in the current culture. When focus leaves the cell, the display text looks like a simple number (i.e. 100.0000 instead of $100.00).
I've attached a sample that shows my xaml. If needed, I can attach the entire sample. Thanks.
Mike
Hello Mike,
The XamComboEditor uses two different templates - Template when not in edit mode and EditTemplate when in edit mode. You can see the full style for the XamComboEditor in the DefaultStyles directory. You can also use ValueToDisplayTextConverter as its name implies it will convert the value to text.
Another way would be to use the Format property and format this as currency.
Hi Alex,
I am aware of the two templates and have already used the existing template to help me override the control template to work around the issue. My main concern is that I shouldn't have had to do that.
If you'll look at the sample I attached, I was already using the ValueToDisplayTextConverter as you indicated in your post. However, it doesn't seem to have any effect. Can you take a look at what I attached and tell me if I'm using it correctly? I can attached a working sample if necessary.
Hi Alex, can you please comment on this post? Thanks.
Sorry for the late response.
If it is just to display it as currency, you can use the format property of the XamComboEditor:
Format="C"