0

Does anybody know how to achieve a cascading dropdownlist in an editor web part?

2
  • Do you mean a 'Content Editor WebPart'? Is so, than you have to write your own JavaScript (try it with jQuery).
    – Dribbel
    Commented Sep 16, 2011 at 14:26
  • sorry, custom editor web part
    – Nick Kahn
    Commented Sep 25, 2011 at 16:46

3 Answers 3

5

Check out Marc Anderson's SPServices library, there is a cascading drop down operation. You could also achieve that functionality through InfoPath forms, but not in the web enabled forms I believe.

1

I assume you are talking about a custom editorpart (toolpanepart). I've done this before using dropdownlist controls and implementing icallbackeventhandler to ajax load the cascading dropdowns. The only gotcha I ran into was a pagevalidation error. I got around that by using the Page.ClientScript.RegisterForEventValidation for my new values of the dropdownlist before my partial postback was complete (in the GetCallbackResult method).

If you don't need dynamic cascading dropdowns, as in the data will always be the same, then you can create an htmlgenericcontrol that has all of your html data in it like you normally would on a html page. I don't think you have to worry about naming conflicts as much with this because you can only have one toolpart pane open at a time.

2
  • do you have sample code?
    – Nick Kahn
    Commented Sep 25, 2011 at 16:45
  • For which solution i outlined above? Commented Sep 26, 2011 at 1:02
0

Try RichControls for Sharepoint 2010, an open source project hosted github. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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