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
2815
Rendering display string of an enum value in 12.1
posted

Say I have an enum defined like this:

enum Status

{

   [DisplayString("All is well")]  ok,   

   [DisplayString("Operation Cancelled)] cancel

}

I have created a EnumValueConverter that returns the display string for each corresponding enum value.  

If I assign a field's ValueConverter property to an instance of EnumValueConverterthe grid does not display the converted value returned from the EnumValueConverter.  However, if the DisplayString does not contain a white space, values are displayed in the grid.

Any ideas on how to deal with this problem?