I have an Infragistics UltraGrid with a bound list of various datatypes. One of these is an enum with non-human readable values. I would like to change the display to something more readable.
In the code base people have been hiding the enum column and adding a string column with the desired values. This doesn't seem right to me. Is there a way of changing the displayed enum values that would be more readable?
Example. Not Readable:
SomeUnreadableEnumValue
Some_Unreadable_Enum_Value
Readable:
Some Readable Text
Update:
I am aware of using Description attributes
public enum MyEnum
{
[Description("Description for Foo")]
Foo,
[Description("Description for Bar")]
Bar
}
as mentioned here See Thomas Levesque answer. I just can't figure out how to bind this description attribute to an UltraGrid that is already bound to an enum.
I just create a property that returns the description and bind to it