9/25/2013 6:43:21 AM
Add custom dropdown to web part property pages
I'm not sure if this has been discussed before, or if I'm missing something obvious in the documentation. If so, I apologise in advance.
My scenario is this:
I need to build a custom web part which allows a content editor to choose from a number of dropdown lists of available values.
These dropdown lists should be populated with data from another database, on another server. Let's say Oracle, but whatever - data access will be handled in the .Net backend.
The dropdown lists are dependent upon each other, and should show and hide depending on the values chosen in the preceding list.
The values chosen will be used to render content within the web part, the mechanics of which send a REST request to an endpoint behind the scenes and build some HTML.
The aim of this is to improve the content editor's experience; the web part itself is trivially simple and already built. What I need to do is give the user a finite number of options within the properties page, and prevent them from entering invalid ID combinations.
Does this sound reasonable?