I have a complex object and one of the variables is an enum. When I assign the object to the PropertyGrid's selected item, it generates a DropDownListEditor for the enum row correctly. However, the display text is automatically the ToString of the enum, which is not ideal for users to see and read. I want to change the display text to be the Description tagged to the enum values but I can't figure out a way to change what the DropDownListEditor displays or to update the values databound to the dropdown to achieve what I want.
public enum ExposureMode
{
[Description("Full Auto")] FullAuto,
[Description("Auto Filter, Fixed Exposure")] AutoFilFixedExp,
[Description("Fixed Filter, Auto Exposure")] FixedFilAutoExp,
[Description("Fixed Filter, Fixed Exposure")] FullFixed
}
So I want the Descriptions to be displayed instead of the ToString (i.e. "Auto Filter, Fixed Exposure" instead of AutoFilFixedExp).