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
315
Unable to use converter to change display text in grid
posted

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

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    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.

Children