SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an visual web part with custom enumeration property which is rendered as drop-down list. I'd like to localize what is displayed in the list, because it's not very informative for the end user. Basically the main question is: how one can override default drop-down rendering to provide custom display strings for each enumeration value?

share|improve this question
Are you talking about a dropdown that is in the edit panel (right side of the page) or one that is rendered in the web part itself? – Jon Lester Oct 6 '11 at 13:29
I mean drop down list in the edit panel, right side of the page. – jjczopek Oct 6 '11 at 13:32
up vote 1 down vote accepted

What you want to do is set the "WebBrowsable" attribute to false on that web part property and implement your own EditorPart (which is just a specialized control for editing web parts). You will have complete control over it. There are a few methods you'll need to implement (both in your webpart and editorpart classes), but it is pretty straightforward. The approach is described in MSDN here:

You can choose to allow SharePoint to automatically rendor the editing controls for your other properties (assuming you have them) or you can do it all yourself in your editor part.

share|improve this answer
thanks, will look into that. – jjczopek Oct 6 '11 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.