Filter the dropdown list for an Enum property in PropertyGrid

Viewed 3348

I am displaying the properties of an object in a PropertyGrid. One of those properties is an enum. So it is displayed with a combobox editor that lists all of the values of the enum. That's all great, but I need to filter that list of enum values at runtime. I can't just decorate some of the enum values with the Browsable attribute, because which of the values I want to hide will vary. At the moment I'm leaning towards a custom UITypeEditor, but I thought I should check with the smart people first.

1 Answers
Related