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
1255
Problem with Localized Enum Converter
posted

I have a xamcomboeditor in a xamdatagrid.  I have an enum with a localized enum converter so the enum values will be displayed correctly in different languages.

One of my data source fields is of type enum. The xamcombobox's itemsource is the enum.  Everything works fine operationally.  When i click the pull down the combo the items are listed in the correct language.  When the xamdatagrid cell is in edit mode the value is display in the correct language.

The problem I have is went the xamdatagrid cell in not in edit mode it does not display the localized value, it only displays the actual name of the enum item.  How do I get the display to use the localized enum value.

Parents
No Data
Reply
  • 9836
    posted

    The XamComboEditor switches between two templates (Template and EditTemplate) when the cell is in edit mode and when it's not. You can use a converter to set the text of the TextBlock that is used in the default Template based on the selected combo's value and your the localization converter. Another option is to set the ValueToDisplayTextConverter of the XamComboEditor.

    Could you possibly send some sample so we can research this issue?

Children