Search code examples
asp.netweb-parts

ASP.Net Web Parts: Can a PropertyGridEditorPart be configured to create a dropdownlist?


Folks,

I have a custom WebPart (the ASP.Net variety) that has a property whose possible values depend on values in a database table. I would like an editor part that will display those values in a dropdownlist.

I know (thanks to Reflector) that the PropertyGridEditorPart can create a dropdownlist when the values are those of an enumeration, but of course that's not what I have.

So this is my last hope before I give in and create yet another custom editor part: is there a way (with attributes, I would assume) to mark up my property declaration in my web part so that the PropertyGridEditorPart will show a dropdownlist instead of a textbox?

Thanks,

Ann L.


Solution

  • Answering my own question to report my findings: No, there's no way to do it automatically, with attributes or otherwise.