I understand the property grid looks at the property first, the type second.
So if you put the typeconverter on only the Enum it should work in both
places.
Although I have not tested the above...
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
<sw************@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
|I fixed the problem by also applying the TypeConverterAttribute
| directly to the Enum. Previously, the TypeConverterAttribute was only
| applied to a public property in a class, which is what makes a
| PropertyGrid work.
| Bill
|
| Jay B. Harlow [MVP - Outlook] wrote:
| > Bill,
| > You can use something like:
| >
| > Dim converter As TypeConverter =
| > TypeDescriptor.GetConverter(GetType(DeviceNameEnum ))
| >
| > To get the converter, be certain to review the parameters to
GetConverter...
| >
| > --
| > Hope this helps
| > Jay B. Harlow [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley -
http://www.tsbradley.net
| >
| >
| > <sw************@yahoo.com> wrote in message
| > news:11**********************@p79g2000cwp.googlegr oups.com...
| > | Hello,
| > |
| > | I have a TypeConverter for converting between this Enum and Strings.
| > |
| > | Public Enum DeviceNameEnum
| > | dnNone
| > | dn2500
| > | dnMirror
| > | End Enum 'DeviceNameEnum
| > |
| > | The Strings are "None", "2500", and "Mirror". The conversion works in
a
| > | PropertyGrid. How can I access the TypeConverter to convert an
instance
| > | of the Enum to the corresponding String to put in a TextBox?
| > | Bill
| > |
|