views:

410

answers:

1

I have a simple web part with a custom enum property (which SharePoint renders for me as a dropdown).

Is there a way to render friendly names for the enum values?

I have tried System.ComponentModel.DescriptionAttribute, but it does not seem to work. I also tried Microsoft.SharePoint.WebPartPages.FriendlyNameAttribute, but it cannot be applied to enum values.

+2  A: 

I assume you're using the ToolPart; why not just wire up your own dropdown instead of letting sharepoint bind the enum for you?

Jason Watts
I am not right now, I was hoping there was a way to do it without using a custom ToolPart.
Robin Clowers
Unfortunately, I usually end up resorting to hooking up my own toolpart for any webpart configuration UI more complex than a textbox.
Jason Watts
yeah I thought that might be the case. Thanks for the confirmation.
Robin Clowers