I'm trying to add a custom property to a WebPart to select multiple terms from a TermSet in SharePoint 2013.

I have found this article: http://msdn.microsoft.com/en-us/library/dd584178(v=office.11).aspx
This, however, is tagged for SharePoint 2003.

Then I found this: http://www.dhirajranka.com/?p=420 which is for SharePoint 2010. But it doesn't seem to work either. I can't override the method GetToolParts() cause there seems to be none in the WebPart class.

So now I'm back at the start and I don't know where to begin. I don't have any idea left now. Maybe someone can point me into a direction? I would really appreciate it.

  • did you try this one: ashokraja.me/articles/… – Waqas Sarwar MVP Jun 24 '14 at 16:23
  • Is using TaxonomyWebTaggingControl an option? – Falak Mahmood Jun 24 '14 at 23:04
  • @WaqasSarwarMCSE Yes, this is the standard way to add a custom property to a WebPart. However, I guess I need to add a somewhat selfmade control for a Metadata Property. – Kaethe Jun 25 '14 at 6:57
  • @FalakMahmood I don't think it is, cause you can't actually use this control as a WebPart Property, can you? If I'm wrong at this, then please let me know. – Kaethe Jun 25 '14 at 6:57
  • You can use TaxonomyWebTaggingControl as a custom web part property! – Falak Mahmood Jun 26 '14 at 10:02

You can incorporate TaxonomyWebTaggingControl in your Web Part and bind it with a Tersmset during the run-time:

More info: http://www.vesoftware.in/2012/04/add-taxonomy-field-taxonomywebtaggingco.html

  • I don't want to add such a control on my actual WebPart. I want to have a Custom WebPart Property that is configurable via the WebPart Properties dialog. – Kaethe Jun 25 '14 at 6:52
  • As far as I know you can't just add this control as a Custom WebPart Property, or can you? – Kaethe Jun 25 '14 at 6:59
  • You could definitely use that :) – Falak Mahmood Jun 26 '14 at 10:00

I found an answer to my question.
You can write your own EditorPart, which will then be displayed in the EditorPanel when you want to change the WebPart Properties.

An example can be found here:

Thank you everyone!

PS: @FalakMahmood you were kinda right with the TaxonomyWebTaggingControl :)

  • You should mark my response as an answer instead of posting on your own! :) – Falak Mahmood Jun 26 '14 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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